package postgresql

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Package Members

  1. package machine
  2. package transport
  3. package types

Type Members

  1. sealed abstract class BackendMessage extends AnyRef
  2. abstract class Client extends QueryClient[String] with Closable
  3. class ClientDispatcher extends GenSerialClientDispatcher[Request, Response, FrontendMessage, BackendMessage]

    Handles transforming the Postgres protocol to an RPC style.

    Handles transforming the Postgres protocol to an RPC style.

    The Postgres protocol is not of the style request => Future[Response]. Instead, it uses a stateful protocol where each connection is in a particular state and streams of requests / responses take place to move the connection from one state to another.

    The dispatcher is responsible for managing this connection state and transforming the stream of request / response to a single request / response style that conforms to Finagle's request / response style.

    The dispatcher uses state machines to handle the connection state management.

    When a connection is established, the HandshakeMachine is immediately executed and takes care of authentication. Subsequent machines to execute are based on the client's query. For example, if the client submits a Request.Query, then the SimpleQueryMachine will be dispatched to manage the connection's state.

    Any unexpected error from the state machine will lead to tearing down the connection to make sure we don't reuse a connection in an unknown / bad state.

    See also

    StateMachine

  4. sealed abstract class FrontendMessage extends AnyRef
  5. case class Parameter[T](value: T)(implicit valueWrites: ValueWrites[T]) extends Product with Serializable
  6. class PgSqlClientError extends PgSqlException
  7. abstract class PgSqlException extends RuntimeException
  8. case class PgSqlInvalidMachineStateError(msg: String) extends PgSqlStateMachineError with Product with Serializable
  9. case class PgSqlNoSuchTransition(machine: String, state: String, msg: String) extends PgSqlStateMachineError with Product with Serializable
  10. case class PgSqlServerError(error: ErrorResponse) extends PgSqlException with Product with Serializable
  11. sealed abstract class PgSqlStateMachineError extends PgSqlClientError
  12. class PgSqlTransporter extends Transporter[FrontendMessage, BackendMessage, TransportContext]

    Transport for the Postgres protocol.

    Transport for the Postgres protocol.

    This is responsible for properly framing the bytes on the wire to form Postgres protocol packets.

  13. case class PgSqlUnsupportedAuthenticationMechanism(method: AuthenticationMessage) extends PgSqlClientError with Product with Serializable
  14. case class PgSqlUnsupportedError(msg: String) extends PgSqlClientError with Product with Serializable
  15. case class PrepareCache(svc: Service[Request, Response], maxSize: Int, statsReceiver: StatsReceiver) extends ServiceProxy[Request, Response] with Product with Serializable

    Caches statements that have been successfully prepared over the connection managed by the underlying service (a ClientDispatcher).

    Caches statements that have been successfully prepared over the connection managed by the underlying service (a ClientDispatcher). This decreases the chances of leaking prepared statements and can simplify the implementation of prepared statements in the presence of a connection pool.

  16. abstract class PreparedStatement extends QueryClient[Seq[Parameter[_]]]
  17. abstract class QueryClient[Q] extends AnyRef
  18. sealed trait Request extends AnyRef
  19. sealed abstract class Response extends AnyRef
  20. final case class ResultSet(fields: IndexedSeq[FieldDescription], wireRows: Seq[IndexedSeq[WireValue]], parameters: ConnectionParameters) extends Product with Serializable
  21. final case class Row(fields: IndexedSeq[FieldDescription], values: IndexedSeq[WireValue], charset: Charset, columnIndex: Map[String, Int]) extends Product with Serializable
  22. class TlsHandshakeTransporter extends Transporter[Buf, Buf, TransportContext]

    The Postgres protocol doesn't use its standard packet format during TLS negotiation.

    The Postgres protocol doesn't use its standard packet format during TLS negotiation.

    https://www.postgresql.org/docs/9.3/protocol-flow.html#AEN100021

    The flow is that the client should request TLS using the FrontendMessage.SslRequest message. The backend responds with a single, unframed byte: either 'S' or 'N'.

    * 'S' means that the backend is willing to continue with TLS negotiation * 'N' means that the backend doesn't support TLS

    Once TLS negotiation is successful, this transport will insert the provided Framer into the netty pipeline, where it would have been inserted by Netty4ClientChannelInitializer.

    This unfortunately requires reaching behind Finagle's abstractions a little bit.

Value Members

  1. object BackendMessage
  2. object Client
  3. object ClientDispatcher
  4. object FrontendMessage
  5. object Params
  6. object PgSqlNoSuchTransition extends Serializable
  7. case object PgSqlPasswordRequired extends PgSqlClientError with Product with Serializable
  8. case object PgSqlTlsUnsupportedError extends PgSqlException with Product with Serializable
  9. object Request
  10. object Response
  11. object ResultSet extends Serializable
  12. object Types

Ungrouped