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
- Alphabetic
- By Inheritance
- message
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
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.
-
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.
-
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. -
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.
-
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.
-
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.
-
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.
-
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.
- case class Bind(portal: String, statement: String, args: List[Option[String]]) extends TaggedFrontendMessage with Product with Serializable
- sealed abstract case class Close extends TaggedFrontendMessage with Product with Serializable
- implicit final class CodecOps[A] extends AnyVal
-
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.
- abstract class ConstFrontendMessage extends TaggedFrontendMessage
- final case class CopyData(data: ByteVector) extends BackendMessage with Product with Serializable
- final case class CopyInResponse(data: ByteVector) extends BackendMessage with Product with Serializable
- final case class CopyOutResponse(data: ByteVector) extends BackendMessage with Product with Serializable
- sealed abstract case class Describe extends TaggedFrontendMessage with Product with Serializable
- final case class ErrorResponse(info: Map[Char, String]) extends BackendMessage with Product with Serializable
- case class Execute(portal: String, maxRows: Int) extends TaggedFrontendMessage with Product with Serializable
- sealed trait FrontendMessage extends AnyRef
- final case class NoticeResponse(info: Map[Char, String]) extends BackendMessage with Product with Serializable
- case class NotificationResponse(value: Notification[String]) extends BackendMessage with Product with Serializable
- case class ParameterDescription(oids: List[Int]) extends BackendMessage with Product with Serializable
- case class ParameterStatus(name: String, value: String) extends BackendMessage with Product with Serializable
- case class Parse(name: String, sql: String, types: List[Int]) extends TaggedFrontendMessage with Product with Serializable
- abstract case class PasswordMessage extends TaggedFrontendMessage with Product with Serializable
- case class Query(sql: String) extends TaggedFrontendMessage with Product with Serializable
- case class ReadyForQuery(status: TransactionStatus) extends BackendMessage with Product with Serializable
- case class RowData(fields: List[Option[String]]) extends BackendMessage with Product with Serializable
- case class RowDescription(fields: List[Field]) extends BackendMessage with Product with Serializable
-
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.
-
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.
- case class StartupMessage(user: String, database: String, parameters: Map[String, String]) extends UntaggedFrontendMessage with Product with Serializable
- abstract class TaggedFrontendMessage extends FrontendMessage
-
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.
- abstract class UntaggedFrontendMessage extends FrontendMessage
Value Members
- implicit val EncoderContravariantSemigroupal: ContravariantSemigroupal[scodec.Encoder]
- implicit def attemptSemigroup[A](implicit arg0: Semigroup[A]): Semigroup[Attempt[A]]
- val identifier: scodec.Codec[Identifier]
- val utf8z: scodec.Codec[String]
-
object
AuthenticationCleartextPassword extends AuthenticationRequest with Product with Serializable
Specifies that the authentication was successful.
-
object
AuthenticationGSS extends AuthenticationRequest with Product with Serializable
Specifies that GSSAPI authentication is required.
- object AuthenticationGSSContinue extends Serializable
- object AuthenticationKerberosV5 extends AuthenticationRequest with Product with Serializable
- object AuthenticationMD5Password extends Serializable
-
object
AuthenticationOk extends AuthenticationRequest with Product with Serializable
Specifies that the authentication was successful.
- object AuthenticationRequest
- object AuthenticationSASL extends Serializable
- object AuthenticationSASLContinue extends Serializable
- object AuthenticationSASLFinal extends Serializable
- object AuthenticationSCMCredential extends AuthenticationRequest with Product with Serializable
-
object
AuthenticationSSPI extends AuthenticationRequest with Product with Serializable
Specifies that SSPI authentication is required.
- object BackendKeyData extends Serializable
- object BackendMessage
- object Bind extends Serializable
- object BindComplete extends BackendMessage with Product with Serializable
- object Close extends Serializable
- object CloseComplete extends BackendMessage with Product with Serializable
- object CommandComplete extends Serializable
- object CopyData extends Serializable
- object CopyDone extends BackendMessage with Product with Serializable
- object CopyFail extends ConstFrontendMessage with Product with Serializable
- object CopyInResponse extends Serializable
- object CopyOutResponse extends Serializable
- object Describe extends Serializable
- object EmptyQueryResponse extends BackendMessage with Product with Serializable
- object ErrorResponse extends Serializable
- object Execute extends Serializable
- object Flush extends ConstFrontendMessage with Product with Serializable
- object NoData extends BackendMessage with Product with Serializable
- object NoticeResponse extends Serializable
- object NotificationResponse extends Serializable
- object ParameterDescription extends Serializable
- object ParameterStatus extends Serializable
- object Parse extends Serializable
- object ParseComplete extends BackendMessage with Product with Serializable
- object PasswordMessage extends PasswordMessagePlatform with Serializable
- object PortalSuspended extends BackendMessage with Product with Serializable
- object Query extends Serializable
- object ReadyForQuery extends Serializable
- object RowData extends Serializable
- object RowDescription extends Serializable
- object SASLInitialResponse extends Serializable
- object SASLResponse extends Serializable
- object StartupMessage extends Serializable
- object Sync extends ConstFrontendMessage with Product with Serializable
- object Terminate extends ConstFrontendMessage with Product with Serializable
- object UnknownMessage extends Serializable