Packages

p

skunk.net

message

package message

Definitions of Postgres messages, with binary encoders and decoders. Doc for this package isn't very good yet, but the message formats are well documented at the linked pages below. It's a straightforward mapping.

It's probably useful to point out that Codec, Encoder, and Decoder in this package are from scodec. They're not the data types of the same name and same general design that are defined above in the skunk package. I realize this is confusing, but it shouldn't be a concern for anyone other than people working on the wire protocol, which never changes (heh-heh) so it shouldn't be a big deal.

Source
package.scala
See also

Frontend/Backend Protocol

Message Formats

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

Type Members

  1. final case class AuthenticationGSSContinue(data: Array[Byte]) extends AuthenticationRequest with Product with Serializable

    Specifies that this message contains GSSAPI or SSPI data.

    Specifies that this message contains GSSAPI or SSPI data.

    data

    GSSAPI or SSPI authentication data.

  2. final case class AuthenticationMD5Password(salt: Array[Byte]) extends AuthenticationRequest with Product with Serializable

    Specifies that an MD5-encrypted password is required.

    Specifies that an MD5-encrypted password is required.

    salt

    The salt to use when encrypting the password.

  3. trait AuthenticationRequest extends BackendMessage

    Family of BackendMessage relating to authentication.

    Family of BackendMessage relating to authentication. All share the same top-level decoder, which switches on a secondary tag and delegates to secondary decoders.

  4. final case class AuthenticationSASL(mechanisms: List[String]) extends AuthenticationRequest with Product with Serializable

    Specifies that SASL authentication is required.

    Specifies that SASL authentication is required. The message body is a list of SASL authentication mechanisms, in the server's order of preference.

    mechanisms

    Names of supported SASL authentication mechanisms.

  5. final case class AuthenticationSASLContinue(data: ByteVector) extends AuthenticationRequest with Product with Serializable

    Specifies that this message contains a SASL challenge.

    Specifies that this message contains a SASL challenge.

    data

    SASL data, specific to the SASL mechanism being used.

  6. final case class AuthenticationSASLFinal(data: ByteVector) extends AuthenticationRequest with Product with Serializable

    Specifies that SASL authentication has completed.

    Specifies that SASL authentication has completed.

    data

    SASL outcome "additional data", specific to the SASL mechanism being used.

  7. final case class BackendKeyData(pid: Int, key: Int) extends BackendMessage with Product with Serializable

    Cancellation key data.

    Cancellation key data. The frontend must save these values if it wishes to be able to issue CancelRequest messages later.

    pid

    The process ID of this backend.

    key

    The secret key of this backend.

  8. trait BackendMessage extends AnyRef

    Family of messages that are received from the server (the "back end").

    Family of messages that are received from the server (the "back end"). These messages all consist of a leading tag and a length-prefixed payload. This is an open hierarchy because I don't like the aesthetics of a 52-case ADT. We may revisit this but it's ok for now.

  9. case class Bind(portal: String, statement: String, args: List[Option[String]]) extends TaggedFrontendMessage with Product with Serializable
  10. sealed abstract case class Close extends TaggedFrontendMessage with Product with Serializable
  11. implicit final class CodecOps[A] extends AnyVal
  12. case class CommandComplete(completion: Completion) extends BackendMessage with Product with Serializable

    Command-completed response.

    Command-completed response. The command tag is usually a single word that identifies which SQL command was completed.

    - For an INSERT command, the tag is INSERT <oid> <rows>, where rows is the number of rows inserted. oid is the object ID of the inserted row if rows is 1 and the target table has OIDs; otherwise oid is 0. - For a DELETE command, the tag is DELETE rows where rows is the number of rows deleted. - For an UPDATE command, the tag is UPDATE rows where rows is the number of rows updated. - For a SELECT or CREATE TABLE AS command, the tag is SELECT rows where rows is the number of rows retrieved. - For a MOVE command, the tag is MOVE rows where rows is the number of rows the cursor's position has been changed by. - For a FETCH command, the tag is FETCH rows where rows is the number of rows that have been retrieved from the cursor. - For a COPY command, the tag is COPY rows where rows is the number of rows copied. (Note: the row count appears only in PostgreSQL 8.2 and later.)

    completion

    The command tag.

  13. abstract class ConstFrontendMessage extends TaggedFrontendMessage
  14. final case class CopyData(data: ByteVector) extends BackendMessage with Product with Serializable
  15. final case class CopyInResponse(data: ByteVector) extends BackendMessage with Product with Serializable
  16. final case class CopyOutResponse(data: ByteVector) extends BackendMessage with Product with Serializable
  17. sealed abstract case class Describe extends TaggedFrontendMessage with Product with Serializable
  18. final case class ErrorResponse(info: Map[Char, String]) extends BackendMessage with Product with Serializable
  19. case class Execute(portal: String, maxRows: Int) extends TaggedFrontendMessage with Product with Serializable
  20. sealed trait FrontendMessage extends AnyRef
  21. final case class NoticeResponse(info: Map[Char, String]) extends BackendMessage with Product with Serializable
  22. case class NotificationResponse(value: Notification[String]) extends BackendMessage with Product with Serializable
  23. case class ParameterDescription(oids: List[Int]) extends BackendMessage with Product with Serializable
  24. case class ParameterStatus(name: String, value: String) extends BackendMessage with Product with Serializable
  25. case class Parse(name: String, sql: String, types: List[Int]) extends TaggedFrontendMessage with Product with Serializable
  26. abstract case class PasswordMessage extends TaggedFrontendMessage with Product with Serializable
  27. case class Query(sql: String) extends TaggedFrontendMessage with Product with Serializable
  28. case class ReadyForQuery(status: TransactionStatus) extends BackendMessage with Product with Serializable
  29. case class RowData(fields: List[Option[String]]) extends BackendMessage with Product with Serializable
  30. case class RowDescription(fields: List[Field]) extends BackendMessage with Product with Serializable
  31. final case class SASLInitialResponse(mechanism: String, initialResponse: ByteVector) extends TaggedFrontendMessage with Product with Serializable

    Initial response from client to server in a SASL authentication.

    Initial response from client to server in a SASL authentication. The supplied mechanism is one of the advertised mechanisms from the AuthenticationSASL message.

    mechanism

    Names of selected SASL authentication mechanism.

    initialResponse

    Mechanism specific response message.

  32. final case class SASLResponse(response: ByteVector) extends TaggedFrontendMessage with Product with Serializable

    Non-initial response from client to server in a SASL authentication.

    Non-initial response from client to server in a SASL authentication.

    response

    Mechanism specific response message.

  33. case class StartupMessage(user: String, database: String, parameters: Map[String, String]) extends UntaggedFrontendMessage with Product with Serializable
  34. abstract class TaggedFrontendMessage extends FrontendMessage
  35. final case class UnknownMessage(tag: Byte, data: ByteVector) extends BackendMessage with Product with Serializable

    Default interpretation of a backend message if the tag is unknown to Skunk.

  36. abstract class UntaggedFrontendMessage extends FrontendMessage

Value Members

  1. implicit val EncoderContravariantSemigroupal: ContravariantSemigroupal[scodec.Encoder]
  2. implicit def attemptSemigroup[A](implicit arg0: Semigroup[A]): Semigroup[Attempt[A]]
  3. val identifier: scodec.Codec[Identifier]
  4. val utf8z: scodec.Codec[String]
  5. object AuthenticationCleartextPassword extends AuthenticationRequest with Product with Serializable

    Specifies that the authentication was successful.

  6. object AuthenticationGSS extends AuthenticationRequest with Product with Serializable

    Specifies that GSSAPI authentication is required.

  7. object AuthenticationGSSContinue extends Serializable
  8. object AuthenticationKerberosV5 extends AuthenticationRequest with Product with Serializable
  9. object AuthenticationMD5Password extends Serializable
  10. object AuthenticationOk extends AuthenticationRequest with Product with Serializable

    Specifies that the authentication was successful.

  11. object AuthenticationRequest
  12. object AuthenticationSASL extends Serializable
  13. object AuthenticationSASLContinue extends Serializable
  14. object AuthenticationSASLFinal extends Serializable
  15. object AuthenticationSCMCredential extends AuthenticationRequest with Product with Serializable
  16. object AuthenticationSSPI extends AuthenticationRequest with Product with Serializable

    Specifies that SSPI authentication is required.

  17. object BackendKeyData extends Serializable
  18. object BackendMessage
  19. object Bind extends Serializable
  20. object BindComplete extends BackendMessage with Product with Serializable
  21. object Close extends Serializable
  22. object CloseComplete extends BackendMessage with Product with Serializable
  23. object CommandComplete extends Serializable
  24. object CopyData extends Serializable
  25. object CopyDone extends BackendMessage with Product with Serializable
  26. object CopyFail extends ConstFrontendMessage with Product with Serializable
  27. object CopyInResponse extends Serializable
  28. object CopyOutResponse extends Serializable
  29. object Describe extends Serializable
  30. object EmptyQueryResponse extends BackendMessage with Product with Serializable
  31. object ErrorResponse extends Serializable
  32. object Execute extends Serializable
  33. object Flush extends ConstFrontendMessage with Product with Serializable
  34. object NoData extends BackendMessage with Product with Serializable
  35. object NoticeResponse extends Serializable
  36. object NotificationResponse extends Serializable
  37. object ParameterDescription extends Serializable
  38. object ParameterStatus extends Serializable
  39. object Parse extends Serializable
  40. object ParseComplete extends BackendMessage with Product with Serializable
  41. object PasswordMessage extends PasswordMessagePlatform with Serializable
  42. object PortalSuspended extends BackendMessage with Product with Serializable
  43. object Query extends Serializable
  44. object ReadyForQuery extends Serializable
  45. object RowData extends Serializable
  46. object RowDescription extends Serializable
  47. object SASLInitialResponse extends Serializable
  48. object SASLResponse extends Serializable
  49. object StartupMessage extends Serializable
  50. object Sync extends ConstFrontendMessage with Product with Serializable
  51. object Terminate extends ConstFrontendMessage with Product with Serializable
  52. object UnknownMessage extends Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped