Documentation ¶
Index ¶
- Constants
- func VitessFieldToDataTypeModifier(field *query.Field) (int32, error)
- func VitessFieldToDataTypeObjectID(field *query.Field) (int32, error)
- func VitessFieldToDataTypeSize(field *query.Field) (int16, error)
- func VitessTypeToObjectID(typ query.Type) (int32, error)
- type AuthenticationCleartextPassword
- type AuthenticationGSS
- type AuthenticationGSSContinue
- type AuthenticationKerberosV5
- type AuthenticationMD5Password
- type AuthenticationOk
- type AuthenticationSASL
- type AuthenticationSASLContinue
- type AuthenticationSASLFinal
- type AuthenticationSCMCredential
- type AuthenticationSSPI
- type BackendKeyData
- type Bind
- type BindComplete
- type BindParameterValue
- type CancelRequest
- type Close
- type CloseComplete
- type CommandComplete
- type CopyBothResponse
- type CopyData
- type CopyDone
- type CopyFail
- type CopyInResponse
- type CopyOutResponse
- type DataRow
- type Describe
- type EmptyQueryResponse
- type ErrorResponse
- type ErrorResponseOptionalFields
- type ErrorResponseSeverity
- type Execute
- type Flush
- type FunctionCall
- type FunctionCallArgument
- type FunctionCallResponse
- type GSSENCRequest
- type GSSENCResponse
- type GSSResponse
- type NegotiateProtocolVersion
- type NoData
- type NoticeResponse
- type NoticeResponseField
- type NotificationResponse
- type ParameterDescription
- type ParameterStatus
- type Parse
- type ParseComplete
- type PasswordMessage
- type PortalSuspended
- type Query
- type ReadyForQuery
- type ReadyForQueryTransactionIndicator
- type RowDescription
- type SASLInitialResponse
- type SASLResponse
- type SSLRequest
- type SSLResponse
- type StartupMessage
- type Sync
- type Terminate
Constants ¶
const ( OidBool = 16 OidBytea = 17 OidChar = 18 OidName = 19 OidInt8 = 20 OidInt2 = 21 OidInt2Vector = 22 OidInt4 = 23 OidRegproc = 24 OidText = 25 OidOid = 26 OidTid = 27 OidXid = 28 OidCid = 29 OidOidVector = 30 OidPgType = 71 OidPgAttribute = 75 OidPgProc = 81 OidPgClass = 83 OidJson = 114 OidXml = 142 OidXmlArray = 143 OidPgNodeTree = 194 OidPgNodeTreeArray = 195 OidJsonArray = 199 OidSmgr = 210 OidIndexAm = 261 OidPoint = 600 OidLseg = 601 OidPath = 602 OidBox = 603 OidPolygon = 604 OidLine = 628 OidCidr = 650 OidCidrArray = 651 OidFloat4 = 700 OidFloat8 = 701 OidAbstime = 702 OidReltime = 703 OidTinterval = 704 OidUnknown = 705 OidCircle = 718 OidCash = 790 OidMacaddr = 829 OidInet = 869 OidByteaArray = 1001 OidInt2Array = 1005 OidInt4Array = 1007 OidTextArray = 1009 OidVarcharArray = 1015 OidInt8Array = 1016 OidPointArray = 1017 OidFloat4Array = 1021 OidFloat8Array = 1022 OidAclitem = 1033 OidAclitemArray = 1034 OidInetArray = 1041 OidVarchar = 1043 OidDate = 1082 OidTime = 1083 OidTimestamp = 1114 OidTimestampArray = 1115 OidDateArray = 1182 OidTimeArray = 1183 OidNumeric = 1700 OidRefcursor = 1790 OidRegprocedure = 2202 OidRegoper = 2203 OidRegoperator = 2204 OidRegclass = 2205 OidRegtype = 2206 OidRegrole = 4096 OidRegnamespace = 4097 OidRegnamespaceArray = 4098 OidRegclassArray = 4099 OidRegRoleArray = 4090 )
Variables ¶
This section is empty.
Functions ¶
func VitessFieldToDataTypeModifier ¶
VitessFieldToDataTypeModifier returns the field's data type modifier as defined by Postgres.
func VitessFieldToDataTypeObjectID ¶
VitessFieldToDataTypeObjectID returns the type of a vitess Field into a type as defined by Postgres. OIDs can be obtained with the following query: `SELECT oid, typname FROM pg_type ORDER BY 1;`
func VitessFieldToDataTypeSize ¶
VitessFieldToDataTypeSize returns the type's size, as defined by Vitess, into the size as defined by Postgres.
Types ¶
type AuthenticationCleartextPassword ¶
type AuthenticationCleartextPassword struct{}
AuthenticationCleartextPassword represents a PostgreSQL message.
func (AuthenticationCleartextPassword) Decode ¶
func (m AuthenticationCleartextPassword) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (AuthenticationCleartextPassword) DefaultMessage ¶
func (m AuthenticationCleartextPassword) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (AuthenticationCleartextPassword) Encode ¶
func (m AuthenticationCleartextPassword) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type AuthenticationGSS ¶
type AuthenticationGSS struct{}
AuthenticationGSS represents a PostgreSQL message.
func (AuthenticationGSS) Decode ¶
func (m AuthenticationGSS) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (AuthenticationGSS) DefaultMessage ¶
func (m AuthenticationGSS) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (AuthenticationGSS) Encode ¶
func (m AuthenticationGSS) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type AuthenticationGSSContinue ¶
type AuthenticationGSSContinue struct {
Data []byte
}
AuthenticationGSSContinue represents a PostgreSQL message.
func (AuthenticationGSSContinue) Decode ¶
func (m AuthenticationGSSContinue) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (AuthenticationGSSContinue) DefaultMessage ¶
func (m AuthenticationGSSContinue) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (AuthenticationGSSContinue) Encode ¶
func (m AuthenticationGSSContinue) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type AuthenticationKerberosV5 ¶
type AuthenticationKerberosV5 struct{}
AuthenticationKerberosV5 represents a PostgreSQL message.
func (AuthenticationKerberosV5) Decode ¶
func (m AuthenticationKerberosV5) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (AuthenticationKerberosV5) DefaultMessage ¶
func (m AuthenticationKerberosV5) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (AuthenticationKerberosV5) Encode ¶
func (m AuthenticationKerberosV5) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type AuthenticationMD5Password ¶
type AuthenticationMD5Password struct {
Salt int32
}
AuthenticationMD5Password represents a PostgreSQL message.
func (AuthenticationMD5Password) Decode ¶
func (m AuthenticationMD5Password) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (AuthenticationMD5Password) DefaultMessage ¶
func (m AuthenticationMD5Password) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (AuthenticationMD5Password) Encode ¶
func (m AuthenticationMD5Password) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type AuthenticationOk ¶
type AuthenticationOk struct{}
AuthenticationOk tells the client that authentication was successful.
func (AuthenticationOk) Decode ¶
func (m AuthenticationOk) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (AuthenticationOk) DefaultMessage ¶
func (m AuthenticationOk) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (AuthenticationOk) Encode ¶
func (m AuthenticationOk) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type AuthenticationSASL ¶
type AuthenticationSASL struct {
Mechanisms []string
}
AuthenticationSASL represents a PostgreSQL message.
func (AuthenticationSASL) Decode ¶
func (m AuthenticationSASL) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (AuthenticationSASL) DefaultMessage ¶
func (m AuthenticationSASL) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (AuthenticationSASL) Encode ¶
func (m AuthenticationSASL) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type AuthenticationSASLContinue ¶
type AuthenticationSASLContinue struct {
Data []byte
}
AuthenticationSASLContinue represents a PostgreSQL message.
func (AuthenticationSASLContinue) Decode ¶
func (m AuthenticationSASLContinue) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (AuthenticationSASLContinue) DefaultMessage ¶
func (m AuthenticationSASLContinue) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (AuthenticationSASLContinue) Encode ¶
func (m AuthenticationSASLContinue) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type AuthenticationSASLFinal ¶
type AuthenticationSASLFinal struct {
AdditionalData []byte
}
AuthenticationSASLFinal represents a PostgreSQL message.
func (AuthenticationSASLFinal) Decode ¶
func (m AuthenticationSASLFinal) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (AuthenticationSASLFinal) DefaultMessage ¶
func (m AuthenticationSASLFinal) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (AuthenticationSASLFinal) Encode ¶
func (m AuthenticationSASLFinal) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type AuthenticationSCMCredential ¶
type AuthenticationSCMCredential struct{}
AuthenticationSCMCredential represents a PostgreSQL message.
func (AuthenticationSCMCredential) Decode ¶
func (m AuthenticationSCMCredential) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (AuthenticationSCMCredential) DefaultMessage ¶
func (m AuthenticationSCMCredential) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (AuthenticationSCMCredential) Encode ¶
func (m AuthenticationSCMCredential) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type AuthenticationSSPI ¶
type AuthenticationSSPI struct{}
AuthenticationSSPI represents a PostgreSQL message.
func (AuthenticationSSPI) Decode ¶
func (m AuthenticationSSPI) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (AuthenticationSSPI) DefaultMessage ¶
func (m AuthenticationSSPI) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (AuthenticationSSPI) Encode ¶
func (m AuthenticationSSPI) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type BackendKeyData ¶
BackendKeyData provides the client with information about the server.
func (BackendKeyData) Decode ¶
func (m BackendKeyData) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (BackendKeyData) DefaultMessage ¶
func (m BackendKeyData) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (BackendKeyData) Encode ¶
func (m BackendKeyData) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type Bind ¶
type Bind struct { DestinationPortal string SourcePreparedStatement string ParameterFormatCodes []int32 ParameterValues []BindParameterValue ResultFormatCodes []int32 }
Bind represents a PostgreSQL message.
func (Bind) DebugString ¶ added in v0.2.0
DebugString returns a debug representation of the Bind message.
func (Bind) Decode ¶
func (m Bind) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (Bind) DefaultMessage ¶
func (m Bind) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (Bind) Encode ¶
func (m Bind) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type BindComplete ¶
type BindComplete struct{}
BindComplete represents a PostgreSQL message.
func (BindComplete) Decode ¶
func (m BindComplete) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (BindComplete) DefaultMessage ¶
func (m BindComplete) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (BindComplete) Encode ¶
func (m BindComplete) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type BindParameterValue ¶
BindParameterValue are parameter values for the Bind message.
type CancelRequest ¶
CancelRequest represents a PostgreSQL message.
func (CancelRequest) Decode ¶
func (m CancelRequest) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (CancelRequest) DefaultMessage ¶
func (m CancelRequest) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (CancelRequest) Encode ¶
func (m CancelRequest) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type Close ¶
type Close struct { ClosingPreparedStatement bool // ClosingPreparedStatement: If true, closing a prepared statement. If false, closing a portal. Target string // Target is the name of whatever we are closing. }
Close represents a PostgreSQL message.
func (Close) Decode ¶
func (m Close) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (Close) DefaultMessage ¶
func (m Close) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (Close) Encode ¶
func (m Close) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type CloseComplete ¶
type CloseComplete struct{}
CloseComplete represents a PostgreSQL message.
func (CloseComplete) Decode ¶
func (m CloseComplete) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (CloseComplete) DefaultMessage ¶
func (m CloseComplete) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (CloseComplete) Encode ¶
func (m CloseComplete) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type CommandComplete ¶
CommandComplete tells the client that the command has completed.
func (CommandComplete) Decode ¶
func (m CommandComplete) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (CommandComplete) DefaultMessage ¶
func (m CommandComplete) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (CommandComplete) Encode ¶
func (m CommandComplete) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
func (CommandComplete) IsIUD ¶
func (m CommandComplete) IsIUD() bool
IsIUD returns whether the query is either an INSERT, UPDATE, or DELETE query.
type CopyBothResponse ¶
type CopyBothResponse struct { IsTextual bool // IsTextual states whether the copy is textual or binary. FormatCodes []int32 }
CopyBothResponse represents a PostgreSQL message.
func (CopyBothResponse) Decode ¶
func (m CopyBothResponse) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (CopyBothResponse) DefaultMessage ¶
func (m CopyBothResponse) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (CopyBothResponse) Encode ¶
func (m CopyBothResponse) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type CopyData ¶
type CopyData struct {
Data []byte
}
CopyData represents a PostgreSQL message.
func (CopyData) Decode ¶
func (m CopyData) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (CopyData) DefaultMessage ¶
func (m CopyData) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (CopyData) Encode ¶
func (m CopyData) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type CopyDone ¶
type CopyDone struct{}
CopyDone represents a PostgreSQL message.
func (CopyDone) Decode ¶
func (m CopyDone) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (CopyDone) DefaultMessage ¶
func (m CopyDone) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (CopyDone) Encode ¶
func (m CopyDone) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type CopyFail ¶
type CopyFail struct {
ErrorMessage string
}
CopyFail represents a PostgreSQL message.
func (CopyFail) Decode ¶
func (m CopyFail) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (CopyFail) DefaultMessage ¶
func (m CopyFail) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (CopyFail) Encode ¶
func (m CopyFail) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type CopyInResponse ¶
type CopyInResponse struct { IsTextual bool // IsTextual states whether the copy is textual or binary. FormatCodes []int32 }
CopyInResponse represents a PostgreSQL message.
func (CopyInResponse) Decode ¶
func (m CopyInResponse) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (CopyInResponse) DefaultMessage ¶
func (m CopyInResponse) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (CopyInResponse) Encode ¶
func (m CopyInResponse) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type CopyOutResponse ¶
type CopyOutResponse struct { IsTextual bool // IsTextual states whether the copy is textual or binary. FormatCodes []int32 }
CopyOutResponse represents a PostgreSQL message.
func (CopyOutResponse) Decode ¶
func (m CopyOutResponse) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (CopyOutResponse) DefaultMessage ¶
func (m CopyOutResponse) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (CopyOutResponse) Encode ¶
func (m CopyOutResponse) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type DataRow ¶
DataRow represents a row of data.
func (DataRow) Decode ¶
func (m DataRow) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (DataRow) DefaultMessage ¶
func (m DataRow) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (DataRow) Encode ¶
func (m DataRow) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type Describe ¶
type Describe struct { IsPrepared bool // IsPrepared states whether we're describing a prepared statement or a portal. Target string }
Describe represents a PostgreSQL message.
func (Describe) DebugString ¶ added in v0.2.0
func (Describe) Decode ¶
func (m Describe) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (Describe) DefaultMessage ¶
func (m Describe) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (Describe) Encode ¶
func (m Describe) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type EmptyQueryResponse ¶
type EmptyQueryResponse struct{}
EmptyQueryResponse represents a PostgreSQL message.
func (EmptyQueryResponse) Decode ¶
func (m EmptyQueryResponse) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (EmptyQueryResponse) DefaultMessage ¶
func (m EmptyQueryResponse) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (EmptyQueryResponse) Encode ¶
func (m EmptyQueryResponse) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type ErrorResponse ¶
type ErrorResponse struct { Severity ErrorResponseSeverity SqlStateCode string Message string Optional ErrorResponseOptionalFields }
ErrorResponse represents a server-side error that should be returned to the client. The Optional fields do not need to be set, but may give additional context for the error.
func (ErrorResponse) Decode ¶
func (m ErrorResponse) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (ErrorResponse) DefaultMessage ¶
func (m ErrorResponse) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (ErrorResponse) Encode ¶
func (m ErrorResponse) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type ErrorResponseOptionalFields ¶
type ErrorResponseOptionalFields struct { Schema string Table string Column string Constraint string Routine string }
ErrorResponseOptionalFields are optional fields that will not be sent if their values are empty strings.
type ErrorResponseSeverity ¶
type ErrorResponseSeverity string
ErrorResponseSeverity represents the severity of an ErrorResponse message.
const ( ErrorResponseSeverity_Error ErrorResponseSeverity = "ERROR" ErrorResponseSeverity_Fatal ErrorResponseSeverity = "FATAL" ErrorResponseSeverity_Panic ErrorResponseSeverity = "PANIC" ErrorResponseSeverity_Warning ErrorResponseSeverity = "WARNING" ErrorResponseSeverity_Notice ErrorResponseSeverity = "NOTICE" ErrorResponseSeverity_Debug ErrorResponseSeverity = "DEBUG" ErrorResponseSeverity_Info ErrorResponseSeverity = "INFO" ErrorResponseSeverity_Log ErrorResponseSeverity = "LOG" )
type Execute ¶
Execute represents a PostgreSQL message.
func (Execute) DebugString ¶ added in v0.2.0
func (Execute) Decode ¶
func (m Execute) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (Execute) DefaultMessage ¶
func (m Execute) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (Execute) Encode ¶
func (m Execute) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type Flush ¶
type Flush struct{}
Flush represents a PostgreSQL message.
func (Flush) Decode ¶
func (m Flush) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (Flush) DefaultMessage ¶
func (m Flush) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (Flush) Encode ¶
func (m Flush) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type FunctionCall ¶
type FunctionCall struct { ObjectID int32 ArgumentFormatCodes []int32 Arguments []FunctionCallArgument ResultFormatCode int32 }
FunctionCall represents a PostgreSQL message.
func (FunctionCall) Decode ¶
func (m FunctionCall) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (FunctionCall) DefaultMessage ¶
func (m FunctionCall) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (FunctionCall) Encode ¶
func (m FunctionCall) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type FunctionCallArgument ¶
FunctionCallArgument are arguments for the FunctionCall message.
type FunctionCallResponse ¶
FunctionCallResponse represents a PostgreSQL message.
func (FunctionCallResponse) Decode ¶
func (m FunctionCallResponse) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (FunctionCallResponse) DefaultMessage ¶
func (m FunctionCallResponse) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (FunctionCallResponse) Encode ¶
func (m FunctionCallResponse) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type GSSENCRequest ¶
type GSSENCRequest struct{}
GSSENCRequest represents a PostgreSQL message.
func (GSSENCRequest) Decode ¶
func (m GSSENCRequest) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (GSSENCRequest) DefaultMessage ¶
func (m GSSENCRequest) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (GSSENCRequest) Encode ¶
func (m GSSENCRequest) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type GSSENCResponse ¶
type GSSENCResponse struct {
SupportsGSSAPI bool
}
GSSENCResponse tells the client whether GSSAPI is supported. This is not a "true" PostgreSQL message, as it is not defined by the documentation as a message. However, clients expect to receive a response, so that response is encoded as a message.
func (GSSENCResponse) Decode ¶
func (m GSSENCResponse) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (GSSENCResponse) DefaultMessage ¶
func (m GSSENCResponse) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (GSSENCResponse) Encode ¶
func (m GSSENCResponse) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type GSSResponse ¶
type GSSResponse struct {
Data []byte
}
GSSResponse represents a PostgreSQL message.
func (GSSResponse) Decode ¶
func (m GSSResponse) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (GSSResponse) DefaultMessage ¶
func (m GSSResponse) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (GSSResponse) Encode ¶
func (m GSSResponse) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type NegotiateProtocolVersion ¶
NegotiateProtocolVersion represents a PostgreSQL message.
func (NegotiateProtocolVersion) Decode ¶
func (m NegotiateProtocolVersion) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (NegotiateProtocolVersion) DefaultMessage ¶
func (m NegotiateProtocolVersion) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (NegotiateProtocolVersion) Encode ¶
func (m NegotiateProtocolVersion) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type NoData ¶
type NoData struct{}
NoData represents a PostgreSQL message.
func (NoData) Decode ¶
func (m NoData) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (NoData) DefaultMessage ¶
func (m NoData) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (NoData) Encode ¶
func (m NoData) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type NoticeResponse ¶
type NoticeResponse struct {
Fields []NoticeResponseField
}
NoticeResponse represents a PostgreSQL message.
func (NoticeResponse) Decode ¶
func (m NoticeResponse) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (NoticeResponse) DefaultMessage ¶
func (m NoticeResponse) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (NoticeResponse) Encode ¶
func (m NoticeResponse) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type NoticeResponseField ¶
NoticeResponseField are the fields to an NoticeResponse message.
type NotificationResponse ¶
NotificationResponse represents a PostgreSQL message.
func (NotificationResponse) Decode ¶
func (m NotificationResponse) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (NotificationResponse) DefaultMessage ¶
func (m NotificationResponse) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (NotificationResponse) Encode ¶
func (m NotificationResponse) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type ParameterDescription ¶
type ParameterDescription struct {
ObjectIDs []int32
}
ParameterDescription represents a PostgreSQL message.
func (ParameterDescription) Decode ¶
func (m ParameterDescription) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (ParameterDescription) DefaultMessage ¶
func (m ParameterDescription) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (ParameterDescription) Encode ¶
func (m ParameterDescription) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type ParameterStatus ¶
ParameterStatus reports various parameters to the client.
func (ParameterStatus) Decode ¶
func (m ParameterStatus) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (ParameterStatus) DefaultMessage ¶
func (m ParameterStatus) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (ParameterStatus) Encode ¶
func (m ParameterStatus) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type Parse ¶
Parse represents a PostgreSQL message.
func (Parse) DebugString ¶ added in v0.2.0
DebugString returns a debug representation of the Parse message.
func (Parse) Decode ¶
func (m Parse) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (Parse) DefaultMessage ¶
func (m Parse) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (Parse) Encode ¶
func (m Parse) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type ParseComplete ¶
type ParseComplete struct{}
ParseComplete represents a PostgreSQL message.
func (ParseComplete) Decode ¶
func (m ParseComplete) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (ParseComplete) DefaultMessage ¶
func (m ParseComplete) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (ParseComplete) Encode ¶
func (m ParseComplete) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type PasswordMessage ¶
type PasswordMessage struct {
Password string
}
PasswordMessage represents a PostgreSQL message.
func (PasswordMessage) Decode ¶
func (m PasswordMessage) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (PasswordMessage) DefaultMessage ¶
func (m PasswordMessage) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (PasswordMessage) Encode ¶
func (m PasswordMessage) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type PortalSuspended ¶
PortalSuspended represents a PostgreSQL message.
func (PortalSuspended) Decode ¶
func (m PortalSuspended) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (PortalSuspended) DefaultMessage ¶
func (m PortalSuspended) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (PortalSuspended) Encode ¶
func (m PortalSuspended) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type Query ¶
type Query struct {
String string
}
Query contains a query given by the client.
func (Query) DebugString ¶ added in v0.2.0
func (Query) Decode ¶
func (m Query) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (Query) DefaultMessage ¶
func (m Query) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (Query) Encode ¶
func (m Query) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type ReadyForQuery ¶
type ReadyForQuery struct {
Indicator ReadyForQueryTransactionIndicator
}
ReadyForQuery tells the client that the server is ready for a new query cycle.
func (ReadyForQuery) Decode ¶
func (m ReadyForQuery) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (ReadyForQuery) DefaultMessage ¶
func (m ReadyForQuery) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (ReadyForQuery) Encode ¶
func (m ReadyForQuery) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type ReadyForQueryTransactionIndicator ¶
type ReadyForQueryTransactionIndicator byte
ReadyForQueryTransactionIndicator indicates the state of the transaction related to the query.
const ( ReadyForQueryTransactionIndicator_Idle ReadyForQueryTransactionIndicator = 'I' ReadyForQueryTransactionIndicator_TransactionBlock ReadyForQueryTransactionIndicator = 'T' ReadyForQueryTransactionIndicator_FailedTransactionBlock ReadyForQueryTransactionIndicator = 'E' )
type RowDescription ¶
RowDescription represents a RowDescription message intended for the client.
func (RowDescription) Decode ¶
func (m RowDescription) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (RowDescription) DefaultMessage ¶
func (m RowDescription) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (RowDescription) Encode ¶
func (m RowDescription) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type SASLInitialResponse ¶
SASLInitialResponse represents a PostgreSQL message.
func (SASLInitialResponse) Decode ¶
func (m SASLInitialResponse) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (SASLInitialResponse) DefaultMessage ¶
func (m SASLInitialResponse) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (SASLInitialResponse) Encode ¶
func (m SASLInitialResponse) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type SASLResponse ¶
type SASLResponse struct {
Data []byte
}
SASLResponse represents a PostgreSQL message.
func (SASLResponse) Decode ¶
func (m SASLResponse) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (SASLResponse) DefaultMessage ¶
func (m SASLResponse) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (SASLResponse) Encode ¶
func (m SASLResponse) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type SSLRequest ¶
type SSLRequest struct{}
SSLRequest represents a PostgreSQL message.
func (SSLRequest) Decode ¶
func (m SSLRequest) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (SSLRequest) DefaultMessage ¶
func (m SSLRequest) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (SSLRequest) Encode ¶
func (m SSLRequest) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type SSLResponse ¶
type SSLResponse struct {
SupportsSSL bool
}
SSLResponse tells the client whether SSL is supported. This is not a "true" PostgreSQL message, as it is not defined by the documentation as a message. However, clients expect to receive a response, so that response is encoded as a message.
func (SSLResponse) Decode ¶
func (m SSLResponse) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (SSLResponse) DefaultMessage ¶
func (m SSLResponse) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (SSLResponse) Encode ¶
func (m SSLResponse) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type StartupMessage ¶
type StartupMessage struct { ProtocolMajorVersion int ProtocolMinorVersion int Parameters map[string]string }
StartupMessage is returned by the client upon connecting to the server, providing details about the client.
func (StartupMessage) Decode ¶
func (m StartupMessage) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (StartupMessage) DefaultMessage ¶
func (m StartupMessage) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (StartupMessage) Encode ¶
func (m StartupMessage) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type Sync ¶
type Sync struct{}
Sync represents a PostgreSQL message.
func (Sync) DebugString ¶ added in v0.2.0
func (Sync) Decode ¶
func (m Sync) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (Sync) DefaultMessage ¶
func (m Sync) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (Sync) Encode ¶
func (m Sync) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
type Terminate ¶
type Terminate struct{}
Terminate tells the server to close the connection.
func (Terminate) Decode ¶
func (m Terminate) Decode(s connection.MessageFormat) (connection.Message, error)
Decode implements the interface connection.Message.
func (Terminate) DefaultMessage ¶
func (m Terminate) DefaultMessage() *connection.MessageFormat
DefaultMessage implements the interface connection.Message.
func (Terminate) Encode ¶
func (m Terminate) Encode() (connection.MessageFormat, error)
Encode implements the interface connection.Message.
Source Files ¶
- authentication_cleartext_password.go
- authentication_gss.go
- authentication_gss_continue.go
- authentication_kerberos_v5.go
- authentication_md5_password.go
- authentication_ok.go
- authentication_sasl.go
- authentication_sasl_continue.go
- authentication_sasl_final.go
- authentication_scm_credential.go
- authentication_sspi.go
- backend_key_data.go
- bind.go
- bind_complete.go
- cancel_request.go
- close.go
- close_complete.go
- command_complete.go
- copy_both_response.go
- copy_data.go
- copy_done.go
- copy_fail.go
- copy_in_response.go
- copy_out_response.go
- data_row.go
- describe.go
- empty_query_response.go
- error_response.go
- execute.go
- flush.go
- function_call.go
- function_call_response.go
- gss_response.go
- gssenc_request.go
- gssenc_response.go
- negotiate_protocol_version.go
- no_data.go
- notice_response.go
- notification_response.go
- parameter_description.go
- parameter_status.go
- parse.go
- parse_complete.go
- password_message.go
- portal_suspended.go
- query.go
- ready_for_query.go
- row_description.go
- sasl_initial_response.go
- sasl_response.go
- ssl_request.go
- ssl_response.go
- startup_message.go
- sync.go
- terminate.go