Packages

  • package root
    Definition Classes
    root
  • package com
    Definition Classes
    root
  • package twitter

    Start with com.twitter.finagle.

    Definition Classes
    com
  • package finagle

    Finagle is an extensible RPC system.

    Finagle is an extensible RPC system.

    Services are represented by class com.twitter.finagle.Service. Clients make use of com.twitter.finagle.Service objects while servers implement them.

    Finagle contains a number of protocol implementations; each of these implement Client and/or com.twitter.finagle.Server. For example, Finagle's HTTP implementation, com.twitter.finagle.Http (in package finagle-http), exposes both.

    Thus a simple HTTP server is built like this:

    import com.twitter.finagle.{Http, Service}
    import com.twitter.finagle.http.{Request, Response}
    import com.twitter.util.{Await, Future}
    
    val service = new Service[Request, Response] {
      def apply(req: Request): Future[Response] =
        Future.value(Response())
    }
    val server = Http.server.serve(":8080", service)
    Await.ready(server)

    We first define a service to which requests are dispatched. In this case, the service returns immediately with a HTTP 200 OK response, and with no content.

    This service is then served via the Http protocol on TCP port 8080. Finally we wait for the server to stop serving.

    We can now query our web server:

    % curl -D - localhost:8080
    HTTP/1.1 200 OK

    Building an HTTP client is also simple. (Note that type annotations are added for illustration.)

    import com.twitter.finagle.{Http, Service}
    import com.twitter.finagle.http.{Request, Response}
    import com.twitter.util.{Future, Return, Throw}
    
    val client: Service[Request, Response] = Http.client.newService("localhost:8080")
    val f: Future[Response] = client(Request()).respond {
      case Return(rep) =>
        printf("Got HTTP response %s\n", rep)
      case Throw(exc) =>
        printf("Got error %s\n", exc)
    }

    Http.client.newService("localhost:8080") constructs a new com.twitter.finagle.Service instance connected to localhost TCP port 8080. We then issue a HTTP/1.1 GET request to URI "/". The service returns a com.twitter.util.Future representing the result of the operation. We listen to this future, printing an appropriate message when the response arrives.

    The Finagle homepage contains useful documentation and resources for using Finagle.

    Definition Classes
    twitter
  • package addr
    Definition Classes
    finagle
  • package builder
    Definition Classes
    finagle
  • package client
    Definition Classes
    finagle
  • package context
    Definition Classes
    finagle
  • package core
    Definition Classes
    finagle
  • package dispatch
    Definition Classes
    finagle
  • package exp

    Package exp contains experimental code.

    Package exp contains experimental code. This can be removed or stabilized (moved elsewhere) at any time.

    Definition Classes
    finagle
  • package factory
    Definition Classes
    finagle
  • package filter
    Definition Classes
    finagle
  • package http
    Definition Classes
    finagle
  • package http2
    Definition Classes
    finagle
  • package liveness
    Definition Classes
    finagle
  • package loadbalancer

    This package implements client side load balancing algorithms.

    This package implements client side load balancing algorithms.

    As an end-user, see the Balancers API to create instances which can be used to configure a Finagle client with various load balancing strategies.

    As an implementor, each algorithm gets its own subdirectory and is exposed via the Balancers object. Several convenient traits are provided which factor out common behavior and can be mixed in (i.e. Balancer, DistributorT, NodeT, and Updating).

    Definition Classes
    finagle
  • package logging
    Definition Classes
    finagle
  • package memcached
    Definition Classes
    finagle
  • package mux

    Package mux implements a generic RPC multiplexer with a rich protocol.

    Package mux implements a generic RPC multiplexer with a rich protocol. Mux is itself encoding independent, so it is meant to use as the transport for other RPC systems (eg. thrift). In OSI terminology, it is a pure session layer.

    In the below description, all numeric values are unsigned and in big-endian byte order. The schema size:4 body:10 defines the field size to be 4 bytes, followed by 10 bytes of the field body. The schema key~4 defines the field key to be defined by 4 bytes interpreted as the size of the field, followed by that many bytes comprising the field itself--it is shorthand for keysize:4 key:keysize. Groups are denoted by parenthesis; * denotes repetition of the previous schema 0 or more times, while {n} indicates repetition exactly n times. Unspecified sizes consume the rest of the frame: they may be specified only as the last field in the message.

    All strings in Mux are Utf-8 encoded, and are never null-terminated.

    Message framing

    Messages in mux are framed with a 4-byte big-endian size header, followed by 1 byte describing the message type and a 3-byte tag; or, diagrammatically: size:4 type:1 tag:3. The remainder of the frame (size-4 bytes) contains the body. Its format depends on the message type, documented below.

    Tag 0 designates a "marker" T message that expects no reply. Some messages may be split into an ordered sequence of fragments. Tag MSB=0 denotes the last message in such a sequence, making the tag namespace 23 bits. The tag is otherwise arbitrary, and is chosen by the sender of the T message.

    Currently, only Tdispatch and Rdispatch messages may be split into an ordered sequence of fragments. TdispatchError message ends a Tdispatch sequence and an Rerr ends an Rdispatch sequence.

    Message types, interpreted as a two's complement, 1-byte integer are numbered as follows: positive numbers are T-messages; their negative complement is the corresponding R message. T-messages greater than 63 (correspondingly R-messages smaller than -63) are session messages. The message number -128 is reserved for Rerr. All other messages are application messages. Middle boxes may forward application messages indiscriminately. Because of an early implementation bug, two aliases exist: 127 is Rerr, and -62 is Tdiscarded.

    The protocol is full duplex: both the server and client may send T messages initiating an exchange.

    Exchanges

    Messages are designated as "T messages" or "R messages", T and R being stand-ins for transmit and receive. A T message initiates an exchange and is assigned a free tag by the sender. A reply is either an R message of the same type (Rx replies to Tx for some x), or an Rerr, indicating a session layer error. R messages are matched to their T messages by tag, and the reply concludes the exchange and frees the tag for future use. Implementations should reuse small tag numbers.

    Messages

    size:4 Tinit:1 tag:3 version:2 (key~4 value~4)* reinitializes a session. Clients typically send this at the beginning of the session. When doing so, the sender may issue no more T messages until the corresponding size:4 Rinit:1 tag:3 version:2 (key~4 value~4)* has been received. After the Rinit was received, all connection state has been reset (outstanding tags are invalidated) and the stream is resumed according to the newly negotiated parameters. Prior to the first Tinit, the session operates at version 1. Rinit's version field is the accepted version of the session (which may be lower than the one requested by Tinit).

    size:4 Treq:1 tag:3 n:1 (key:1 value~1){n} body: initiates the request described by its body. The request body is delivered to the application. The request header contains a number of key-value pairs that describe request metadata.

    Keys for Treq messages are as follows:

    1. traceid: a 24-byte value describing the full Dapper trace id assigned by the client. The value's format is spanid:8 parentid:8 traceid:8.

    2. traceflag: a bitmask describing trace flags. Currently, the only defined flag is bit 0 which enables "debug mode", asking the server to force trace sampling.

    size:4 Tdispatch:1 tag:3 nctx:2 (ckey~2 cval~2){nc} dst~2 nd:2 (from~2 to~2){nd} body: implements destination dispatch. Tdispatch messages carry a set of keyed request contexts, followed by a logical destination encoded as a UTF-8 string. A delegation table follows describing rewrite rules that apply to this request.

    size:4 Rreq:1 tag:3 status:1 body: replies to a request. Status codes are as follows: 0=OK; the body contains the reply. 1=ERROR; the body contains a string describing the error. 2=NACK; a negative acknowledgment, the body contains a string describing the reason.

    size:4 Rdispatch:1 tag:3 status:1 nctx:2 (key~2 value~2){nctx} body: replies to a Tdispatch request. Status codes are as in Rreq. Replies can include request contexts. MuxFailure flags are currently sent via Rdispatch contexts under the "MuxFailure" key. See the MuxFailure flags section below.

    size:4 Rerr:1 tag:3 why: indicates that the corresponding T message produced an error. Rerr is specifically for server errors: the server failed to interpret or act on the message. The body carries a string describing the error.

    size:4 Tdrain:1 tag:3 is a request sent by the server telling the client to stop sending new requests. A client acknowledges this with an Rdrain message.

    size:4 Tping:1 tag:3 is sent by either party to check the liveness of its peer; these should be responded to immediately with a Rping message.

    size:4 Tdiscarded:1 tag:3 discard_tag:3 why: is a marker message and therefore has a tag value of 0. discard_tag indicates the tag of the Tdispatch to be discarded by the client. This can be used as a hint for early termination. Why is a string describing why the request was discarded. Note that it does *not* free the server from the obligation of replying to the original Treq.

    size:4 Tlease:1 tag:3 unit:1 howmuch:8 is a marker message indicating that a lease has been issued for howmuch units. As a marker message, its tag value must be 0. Unit '0' is reserved for duration in milliseconds. Whenever a lease has not been issued, a client can assume it holds an indefinite lease. Adhering to the lease is optional, but the server may reject requests or provide degraded service should the lease expire. This is used by servers to implement features like garbage collection avoidance.

    MuxFailure Flags

    Failure flags are read and written as an 8 byte integer. Unrecognized flags will be ignored silently, but should all be considered reserved for future use.

    Flag Value Meaning Restartable 1 << 0 Request is safe to re-issue Rejected 1 << 1 Request was rejected/Nacked by the server NonRetryable 1 << 2 Request should not be retried

    Security

    TLS is supported via three mechanisms: - Explicit and exclusive TLS. This pathway involves requiring the establishment of TLS immediately after establishing the socket connection. This is configured by adding TLS configuration to the client or server and not configuring opportunistic TLS or TLS snooping (see below).

    - Negotiated Opportunistic TLS. This pathway involves starting the connection as cleartext and the client and server subsequently negotiate a TLS level via the handshake. Based on that handshake the connection is either left as cleartext or upgraded to TLS. This is configured by adding TLS configuration and also configuring an opportunistic TLS level but not configuring TLS snooping.

    In this pathway there are three configuration options:

    • Off signals that TLS is not supported by this peer
    • Desired signals that TLS is preferred but not required by this peer
    • Required signals that this peer will only allow the session to continue over TLS

    - TLS snooping. This pathway allows a server to use TLS either by performing a TLS handshake immediately after the socket is established or by starting the session as cleartext or using the negotiated pathway described above. If the session is started as a TLS session the headers that drive the opportunistic TLS pathway are ignored.

    Note that the server may still require TLS but leaves the option to start TLS immediately after establishing the socket or starting cleartext and requiring TLS via the opportunistic TLS pathway described above.

    Definition Classes
    finagle
  • package mysql
    Definition Classes
    finagle
  • package param
  • package transport
  • BigDecimalValue
  • BigIntTooLongException
  • BigIntValue
  • ByteValue
  • CanBeParameter
  • Capability
  • Client
  • CloseRequest
  • CloseStatementOK
  • ColumnNotFoundException
  • Command
  • CommandRequest
  • ConnectionInitSql
  • CursorResult
  • CursoredStatement
  • DateValue
  • Decoder
  • DoubleValue
  • EOF
  • EmptyValue
  • Error
  • ExecuteRequest
  • FailedToEncryptPasswordException
  • FetchRequest
  • FetchResult
  • Field
  • FieldAttributes
  • FloatValue
  • HandshakeInit
  • IncompatibleCharset
  • IncompatibleServerError
  • IncompatibleVersion
  • InsufficientServerCapabilitiesException
  • IntValue
  • IsolationLevel
  • JsonValue
  • LongValue
  • LostSyncException
  • MysqlCharset
  • NullValue
  • OK
  • Parameter
  • Parameters
  • PingRequest
  • PrepareOK
  • PrepareRequest
  • PreparedStatement
  • QueryRequest
  • QuitRequest
  • RawValue
  • Request
  • Result
  • ResultSet
  • RollbackFactory
  • Row
  • ServerError
  • ServerStatus
  • Session
  • ShortValue
  • SimpleCommandRequest
  • StringValue
  • TimestampValue
  • Transactions
  • Type
  • UnsupportedTypeException
  • UseRequest
  • Value
  • ValueSerializationException
  • WithSql
  • package namer
    Definition Classes
    finagle
  • package naming
    Definition Classes
    finagle
  • package netty4

    Package netty4 implements the bottom finagle primitives: com.twitter.finagle.Server and a client transport in terms of the netty4 event loop.

    Package netty4 implements the bottom finagle primitives: com.twitter.finagle.Server and a client transport in terms of the netty4 event loop.

    Definition Classes
    finagle
  • package offload
    Definition Classes
    finagle
  • package param

    Defines common com.twitter.finagle.Stack.Param's shared between finagle clients and servers.

    Defines common com.twitter.finagle.Stack.Param's shared between finagle clients and servers.

    Definition Classes
    finagle
  • package partitioning
    Definition Classes
    finagle
  • package pool
    Definition Classes
    finagle
  • package postgresql
    Definition Classes
    finagle
  • package pushsession
    Definition Classes
    finagle
  • package redis
    Definition Classes
    finagle
  • package scribe
    Definition Classes
    finagle
  • package server
    Definition Classes
    finagle
  • package serverset2
    Definition Classes
    finagle
  • package service
    Definition Classes
    finagle
  • package ssl
    Definition Classes
    finagle
  • package stats
    Definition Classes
    finagle
  • package thrift

    Please use the new interface, com.twitter.finagle.Thrift, for constructing Thrift clients and servers.

    Deprecation

    Please use the new interface, com.twitter.finagle.Thrift, for constructing Thrift clients and servers.

    Thrift codecs

    We provide client and server protocol support for the framed protocol. The public implementations are defined on the Thrift object:

    The type of the server codec is Service[Array[Byte], Array[Byte]] and the client codecs are Service[ThriftClientRequest, Array[Byte]]. The service provided is that of a "transport" of thrift messages (requests and replies) according to the protocol chosen. This is why the client codecs need to have access to a thrift ProtocolFactory.

    These transports are used by the services produced by the finagle thrift codegenerator.

    val service: Service[ThriftClientRequest, Array[Byte]] = ClientBuilder()
      .hosts("foobar.com:123")
      .stack(Thrift.client)
      .build()
    
    // Wrap the raw Thrift transport in a Client decorator. The client
    // provides a convenient procedural interface for accessing the Thrift
    // server.
    val client = new Hello.ServiceToClient(service, protocolFactory)

    In this example, Hello is the thrift interface, and the inner class ServiceToClient is provided by the finagle thrift code generator.

    Definition Classes
    finagle
  • package thriftmux
    Definition Classes
    finagle
  • package toggle
    Definition Classes
    finagle
  • package tracing
    Definition Classes
    finagle
  • package transport
    Definition Classes
    finagle
  • package tunable
    Definition Classes
    finagle
  • package util
    Definition Classes
    finagle
  • package zipkin
    Definition Classes
    finagle
  • package zookeeper
    Definition Classes
    finagle

package mysql

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. mysql
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Package Members

  1. package param
  2. package transport

Type Members

  1. class BigIntTooLongException extends Exception
  2. case class BigIntValue(bi: BigInt) extends Value with Product with Serializable
  3. case class ByteValue(b: Byte) extends Value with Product with Serializable
  4. trait CanBeParameter[-A] extends AnyRef
  5. case class Capability(mask: Int) extends Product with Serializable
  6. trait Client extends Closable

    A MySQL client that is not Service-based like com.twitter.finagle.Mysql.Client is, making it easier to use for most cases.

    A MySQL client that is not Service-based like com.twitter.finagle.Mysql.Client is, making it easier to use for most cases.

    Example:
    1. Creation:

      import com.twitter.finagle.Mysql
      import com.twitter.finagle.mysql.Client
      
      val client: Client = Mysql.client
        .withCredentials("username", "password")
        .withDatabase("database")
        .newRichClient("host:port")
  7. case class CloseRequest(stmtId: Int) extends CommandRequest with Product with Serializable

    A CloseRequest deallocates a prepared statement on the server.

    A CloseRequest deallocates a prepared statement on the server. No response is sent back to the client. https://dev.mysql.com/doc/internals/en/com-stmt-close.html

  8. class ColumnNotFoundException extends SQLNonTransientException with FailureFlags[ColumnNotFoundException]

    Indicates the requested column name was not found.

  9. abstract class CommandRequest extends Request

    A command request is a request initiated by the client and has a cmd byte associated with it.

  10. trait CursorResult[T] extends Closable

    A closable async stream of projected rows from a CursoredStatement.

  11. trait CursoredStatement extends AnyRef

    A CursoredStatement represents a parameterized SQL statement applied concurrently with varying parameters and yields a lazy stream of rows.

    A CursoredStatement represents a parameterized SQL statement applied concurrently with varying parameters and yields a lazy stream of rows.

    These are SQL statements with ?'s used for the parameters which are "filled in" per usage by apply.

    See also

    Client.cursor(String

    PreparedStatement for eager processing of Rows.

  12. trait Decoder[T <: Result] extends (Packet) => Try[T]

    A decoder for Results contained in a single packet.

  13. case class DoubleValue(d: Double) extends Value with Product with Serializable
  14. case class EOF(warnings: Short, serverStatus: ServerStatus) extends Result with Product with Serializable
  15. case class Error(code: Short, sqlState: String, message: String) extends Result with Product with Serializable
  16. class ExecuteRequest extends CommandRequest

    Uses the binary protocol to build an execute request for a prepared statement.

    Uses the binary protocol to build an execute request for a prepared statement. https://dev.mysql.com/doc/internals/en/com-stmt-execute.html

  17. class FailedToEncryptPasswordException extends Exception with FailureFlags[FailedToEncryptPasswordException]

    The exception that is thrown if something goes awry during the encryption process.

    The exception that is thrown if something goes awry during the encryption process. This exception has the FailureFlags.NonRetryable flag because this error is thrown only in cases when the client is incorrectly configured.

  18. class FetchRequest extends CommandRequest
  19. case class FetchResult(rowPackets: Seq[Packet], containsLastRow: Boolean) extends Result with Product with Serializable
  20. case class Field(catalog: String, db: String, table: String, origTable: String, name: String, origName: String, charset: Short, displayLength: Int, fieldType: Short, flags: Short, decimals: Byte) extends Result with Product with Serializable
  21. case class FloatValue(f: Float) extends Value with Product with Serializable
  22. case class HandshakeInit(protocol: Byte, version: String, threadId: Int, salt: Array[Byte], serverCapabilities: Capability, charset: Short, status: Short) extends Result with Product with Serializable
  23. class IncompatibleServerError extends Exception

    A base class for exceptions related to client incompatibility with an upstream MySQL server.

  24. class InsufficientServerCapabilitiesException extends SQLNonTransientException with FailureFlags[InsufficientServerCapabilitiesException]

    Indicates that the server lacks required capabilities

  25. case class IntValue(i: Int) extends Value with Product with Serializable
  26. sealed trait IsolationLevel extends AnyRef
  27. case class LongValue(l: Long) extends Value with Product with Serializable
  28. final case class LostSyncException(underlying: Throwable) extends RuntimeException with Product with Serializable

    A LostSyncException indicates that this finagle-mysql client and the MySQL server are no longer able to properly communicate, as there has been a failure to decode a message from the server or data has become corrupted in transmission.

    A LostSyncException indicates that this finagle-mysql client and the MySQL server are no longer able to properly communicate, as there has been a failure to decode a message from the server or data has become corrupted in transmission. It is a fatal error and the communication with the server must be closed, then reopened, and renegotiated.

  29. case class OK(affectedRows: Long, insertId: Long, serverStatus: Int, warningCount: Int, message: String) extends Result with Product with Serializable

    Represents the OK Packet received from the server.

    Represents the OK Packet received from the server. It is sent to indicate that a command (e.g. PreparedStatement.modify) has completed successfully.

    affectedRows

    how many records were changed by the command.

    insertId

    the first automatically generated value successfully inserted for an AUTO_INCREMENT column for an INSERT statement.

    serverStatus

    server status bit mask.

    warningCount

    how many warnings were generated.

    message

    the status message, which will be an empty String if none is present.

  30. sealed trait Parameter extends AnyRef

    A value of type A can implicitly convert to a Parameter if an evidence CanBeParameter[A] is available in scope via the Parameter.wrap or Parameter.wrapOption implicits.

    A value of type A can implicitly convert to a Parameter if an evidence CanBeParameter[A] is available in scope via the Parameter.wrap or Parameter.wrapOption implicits. Explicit conversions are available via Parameter.of and Parameters.of.

    A Scala example with implicits:

    import com.twitter.finagle.mysql.Parameter
    import com.twitter.finagle.mysql.Parameter._
    
    val p: Parameter = "this will get implicitly converted to a Parameter"

    A Scala example without implicits:

    import com.twitter.finagle.mysql.Parameter
    
    val p: Parameter = Parameter.of("explicitly converted to a Parameter")

    A Java example:

    import com.twitter.finagle.mysql.Parameter;
    import com.twitter.finagle.mysql.Parameters;
    
    Parameter p = Parameters.of("explicitly converted to a Parameter");
  31. case class PrepareOK(id: Int, numOfCols: Int, numOfParams: Int, warningCount: Int, columns: Seq[Field] = Nil, params: Seq[Field] = Nil) extends Result with Product with Serializable
  32. case class PrepareRequest(sqlStatement: String) extends SimpleCommandRequest with WithSql with Product with Serializable

    Allocates a prepared statement on the server from the passed in query string.

    Allocates a prepared statement on the server from the passed in query string. https://dev.mysql.com/doc/internals/en/com-stmt-prepare.html

  33. trait PreparedStatement extends AnyRef

    A PreparedStatement represents a parameterized SQL statement which may be applied concurrently with varying parameters.

    A PreparedStatement represents a parameterized SQL statement which may be applied concurrently with varying parameters.

    These are SQL statements with ?'s used for the parameters which are "filled in" per usage by read, select, and modify.

    See also

    Client.prepare(String)

    CursoredStatement for a lazy stream of Rows.

  34. case class QueryRequest(sqlStatement: String) extends SimpleCommandRequest with WithSql with Product with Serializable

    A QueryRequest is used to send the server a text-based query that is executed immediately.

    A QueryRequest is used to send the server a text-based query that is executed immediately. https://dev.mysql.com/doc/internals/en/com-query.html

  35. case class RawValue(typ: Short, charset: Short, isBinary: Boolean, bytes: Array[Byte]) extends Value with Product with Serializable

    A RawValue contains the raw bytes that represent a value and enough meta data to decode the bytes.

    A RawValue contains the raw bytes that represent a value and enough meta data to decode the bytes.

    typ

    The MySQL type code for this value.

    charset

    The charset encoding of the bytes.

    isBinary

    Disambiguates between the text and binary protocol.

    bytes

    The raw bytes for this value.

  36. sealed trait Request extends ProtocolMessage

    A Request is an outgoing message sent by the client as part of the MySQL protocol.

    A Request is an outgoing message sent by the client as part of the MySQL protocol. It is packet-based and based around a MySQL command.

  37. sealed trait Result extends AnyRef
  38. case class ResultSet(fields: Seq[Field], rows: Seq[Row]) extends Result with Product with Serializable
  39. final class RollbackFactory extends ServiceFactoryProxy[Request, Result]

    A ServiceFactory that ensures a ROLLBACK statement is issued when a service is put back into the connection pool.

    A ServiceFactory that ensures a ROLLBACK statement is issued when a service is put back into the connection pool.

    See also

    https://dev.mysql.com/doc/en/implicit-commit.html

  40. trait Row extends AnyRef

    A Row allows you to extract Value's from a MySQL row.

    A Row allows you to extract Value's from a MySQL row.

    Column values can be accessed by the MySQL column name via the typed xyzOrNull and getXyz methods. For example, stringOrNull and getString. The get-prefixed methods return Options and use None to represent a SQL NULL. For SQL NULLs, the or-suffixed methods return null for Object-types and use a sentinel, like 0, for primitives.

    Alternatively, Value's based on the column name can be accessed via the apply method.

    For example, given the query, SELECT 'text' AS str_col, 123 AS int_col, you could extract the columns as such.

    First, in Scala:

    import com.twitter.finagle.mysql.Row
    val row: Row = ???
    
    // if the column is not null:
    val strCol: String = row.stringOrNull("str_col")
    val intCol: Int = row.intOrZero("int_col")
    
    // if the column is nullable:
    val strCol: Option[String] = row.getString("str_col")
    val intCol: Option[java.lang.Integer] = row.getInteger("int_col")

    Then, the same in Java:

    import com.twitter.finagle.mysql.Row;
    import scala.Option;
    Row row = ...
    
    // if the column is not null:
    String strCol = row.stringOrNull("str_col");
    int intCol = row.intOrZero("int_col");
    
    // if the column is nullable:
    Option<String> strCol = row.getString("str_col");
    Option<Integer> intCol = row.getInteger("int_col");
    See also

    PreparedStatement.select

    Client.select

    Client.cursor

  41. case class ServerError(code: Short, sqlState: String, message: String) extends Exception with Product with Serializable

    A catch-all exception class for errors returned from the upstream MySQL server.

  42. case class ServerStatus(mask: Int) extends Product with Serializable

    Represents the ServerStatus as represented in EOF packets

    Represents the ServerStatus as represented in EOF packets

    mask

    the raw bit mask in the EOF packet

  43. trait Session extends AnyRef

    Explicitly manage the lifecycle of a MySQL session.

    Explicitly manage the lifecycle of a MySQL session.

    See also

    Client#session()

  44. case class ShortValue(s: Short) extends Value with Product with Serializable
  45. class SimpleCommandRequest extends CommandRequest

    Defines a request that encodes the command byte and associated data into a packet.

  46. case class StringValue(s: String) extends Value with Product with Serializable
  47. class TimestampValue extends Injectable[Timestamp] with Extractable[Timestamp]

    An injector/extractor of java.sql.Timestamp values.

  48. trait Transactions extends AnyRef
  49. class UnsupportedTypeException extends SQLNonTransientException with FailureFlags[UnsupportedTypeException]

    Indicates the requested column was for an unsupported type.

    Indicates the requested column was for an unsupported type. For example, asking for a string when the column is a tinyint.

  50. case class UseRequest(dbName: String) extends SimpleCommandRequest with Product with Serializable

    A UseRequest is used to change the default schema of the connection.

    A UseRequest is used to change the default schema of the connection. https://dev.mysql.com/doc/internals/en/com-init-db.html

  51. sealed trait Value extends AnyRef

    Defines a Value ADT that represents the domain of values received from a mysql server.

  52. class ValueSerializationException extends SQLNonTransientException with FailureFlags[ValueSerializationException]

    Thrown if unable to serialize a value of the column.

  53. sealed trait WithSql extends AnyRef

    Contains the SQL for a Request.

Value Members

  1. object BigDecimalValue extends Injectable[BigDecimal] with Extractable[BigDecimal]
  2. object CanBeParameter

    When a new implicit CanBeParameter is added here, it should also be explicitly added to Parameter.unsafeWrap.

  3. object Capability extends Serializable
  4. object Client
  5. object CloseStatementOK extends OK

    Used internally to synthesize a response from the server when sending a prepared statement CloseRequest

  6. object Command
  7. object ConnectionInitSql

    A stack module that executes a request when create a connection.

    A stack module that executes a request when create a connection.

    Note

    that this needs to be added at the bottom of the stack near the prepConn Role.

  8. object CursoredStatement
  9. object DateValue extends Injectable[Date] with Extractable[Date]
  10. object EOF extends Decoder[EOF] with Serializable

    Represents and EOF result received from the server which contains any warnings and the server status.

    Represents and EOF result received from the server which contains any warnings and the server status. https://dev.mysql.com/doc/internals/en/generic-response-packets.html#packet-EOF_Packet

  11. case object EmptyValue extends Value with Product with Serializable
  12. object Error extends Decoder[Error] with Serializable

    Represents the Error Packet received from the server and the data sent along with it.

    Represents the Error Packet received from the server and the data sent along with it. https://dev.mysql.com/doc/internals/en/generic-response-packets.html#packet-ERR_Packet

  13. object ExecuteRequest
  14. object FetchResult extends Serializable
  15. object Field extends Decoder[Field] with Serializable

    Represents the column meta-data associated with a query.

    Represents the column meta-data associated with a query. Sent during ResultSet transmission and as part of the meta-data associated with a Row. https://dev.mysql.com/doc/internals/en/com-query-response.html#packet-Protocol::ColumnDefinition41

  16. object FieldAttributes

    These bit masks are to understand whether corresponding attribute is set for the field.

    These bit masks are to understand whether corresponding attribute is set for the field. Link to source code from mysql is below. https://github.com/mysql/mysql-server/blob/5.7/include/mysql_com.h

  17. object HandshakeInit extends Decoder[HandshakeInit] with Serializable

    First result received from the server as part of the connection phase.

    First result received from the server as part of the connection phase. https://dev.mysql.com/doc/internals/en/connection-phase-packets.html

  18. case object IncompatibleCharset extends IncompatibleServerError with Product with Serializable

    Indicates that the server to which the client is connected is configured to use a charset that the client is incompatible with.

  19. case object IncompatibleVersion extends IncompatibleServerError with Product with Serializable

    Indicates that the server to which the client is connected is running a version of MySQL that the client is incompatible with.

  20. object IsolationLevel

    MySQL Isolation Levels.

    MySQL Isolation Levels. Used to override the SESSION or GLOBAL isolation level when executing transactions.

    See also

    com.twitter.finagle.mysql.Transactions

    https://dev.mysql.com/doc/refman/5.7/en/innodb-transaction-isolation-levels.html

  21. object JsonValue
  22. object LostSyncException extends Serializable
  23. object MysqlCharset
  24. case object NullValue extends Value with Product with Serializable
  25. object OK extends Decoder[OK] with Serializable
  26. object Parameter

    For Scala users, the typical usage is by importing the implicit conversions and then letting the compiler do the conversions for you.

    For Scala users, the typical usage is by importing the implicit conversions and then letting the compiler do the conversions for you. Explicit runtime conversions are also available via Parameter.of.

    Java users should generally be using Parameters.of to do explicit conversions.

    A Scala example with implicits:

    import com.twitter.finagle.mysql.Parameter
    import com.twitter.finagle.mysql.Parameter._
    
    val p: Parameter = "this will get implicitly converted to a Parameter"

    A Scala example without implicits:

    import com.twitter.finagle.mysql.Parameter
    
    val p: Parameter = Parameter.of("explicitly converted to a Parameter")

    A Java example:

    import com.twitter.finagle.mysql.Parameter;
    import com.twitter.finagle.mysql.Parameters;
    
    Parameter p = Parameters.of("explicitly converted to a Parameter");
    See also

    Parameters for a Java-friendly API.

  27. object Parameters

    A Java adaptation of the com.twitter.finagle.mysql.Parameter companion object.

  28. case object PingRequest extends SimpleCommandRequest with Product with Serializable

    A request to check if the server is alive.

    A request to check if the server is alive. https://dev.mysql.com/doc/internals/en/com-ping.html

  29. object PrepareOK extends Decoder[PrepareOK] with Serializable

    Meta data returned from the server in response to a prepared statement initialization request COM_STMT_PREPARE.

    Meta data returned from the server in response to a prepared statement initialization request COM_STMT_PREPARE. https://dev.mysql.com/doc/internals/en/com-stmt-prepare-response.html#packet-COM_STMT_PREPARE_OK

  30. object PreparedStatement
  31. case object QuitRequest extends SimpleCommandRequest with Product with Serializable

    Tells the server that the client wants to close the connection.

    Tells the server that the client wants to close the connection. https://dev.mysql.com/doc/internals/en/com-quit.html

  32. object RollbackFactory
  33. object ServerStatus extends Serializable
  34. object TimestampValue extends TimestampValue

    Extracts a value in UTC.

    Extracts a value in UTC. To use a different time zone, create an instance of com.twitter.finagle.mysql.TimestampValue.

  35. object Type

Inherited from AnyRef

Inherited from Any

Ungrouped