Documentation ¶
Index ¶
- Constants
- Variables
- type AuthRequest
- type AuthResponse
- type AuthSASLInitialResponse
- type AuthSASLResponse
- type BackendKeyData
- type BindCompletion
- type CloseComplete
- type Column
- type CommandCompletion
- type CopyCompletion
- type CopyData
- type CopyFail
- type CopyFormat
- type CopyInResponse
- type CopyOutResponse
- type Data
- func NewBind(stat string, args []driver.Value) *Data
- func NewCancelRequest(pid, key uint32) *Data
- func NewCloseStat(stat string) *Data
- func NewDescribe(stat string) *Data
- func NewExecute() *Data
- func NewFlush() *Data
- func NewParse(sid, query string) *Data
- func NewSSLRequest() *Data
- func NewSimpleQuery(stat string) *Data
- func NewSync() *Data
- func NewTermination() *Data
- type DataRow
- type Decoder
- type EmptyQueryResponse
- type Encoder
- type Error
- type Frame
- type NoData
- type NoticeResponse
- type Notification
- type ParameterDescription
- type ParameterStatus
- type ParseCompletion
- type PgError
- type PgType
- type ReadyForQuery
- type RowDescription
- type SSLRequest
- type Startup
- type TransactionStatus
- type Type
Constants ¶
View Source
const ( TypeAuthRequest = 'R' TypeParameterStatus = 'S' TypeBackendKeyData = 'K' TypeReadyForQuery = 'Z' TypeParseCompletion = '1' TypeParameterDescription = 't' TypeRowDescription = 'T' TypeDataRow = 'D' TypeCommandCompletion = 'C' TypeError = 'E' TypeNotification = 'A' TypeCloseComplete = '3' TypeEmptyQueryResponse = 'I' TypeNoData = 'n' TypeNoticeResponse = 'N' )
View Source
const ( TransactionStatusNoReady = 'N' TransactionStatusIdle = 'I' TransactionStatusIdleInTransaction = 'T' TransactionStatusInFailedTransaction = 'E' )
View Source
const ( PgTypeBool = 16 PgTypeBytea = 17 PgTypeChar = 18 PgTypeName = 19 PgTypeInt8 = 20 PgTypeInt2 = 21 PgTypeInt2vector = 22 PgTypeInt4 = 23 PgTypeRegproc = 24 PgTypeText = 25 PgTypeOid = 26 PgTypeTid = 27 PgTypeXid = 28 PgTypeCid = 29 PgTypeOidvector = 30 PgTypePgDdlCommand = 32 PgTypePgType = 71 PgTypePgAttribute = 75 PgTypePgProc = 81 PgTypePgClass = 83 PgTypeJson = 114 PgTypeXml = 142 PgTypeArrXml = 143 PgTypePgNodeTree = 194 PgTypeArrJson = 199 PgTypeSmgr = 210 PgTypeIndexAmHandler = 325 PgTypePoint = 600 PgTypeLseg = 601 PgTypePath = 602 PgTypeBox = 603 PgTypePolygon = 604 PgTypeLine = 628 PgTypeArrLine = 629 PgTypeCidr = 650 PgTypeArrCidr = 651 PgTypeFloat4 = 700 PgTypeFloat8 = 701 PgTypeAbstime = 702 PgTypeReltime = 703 PgTypeTinterval = 704 PgTypeUnknown = 705 PgTypeCircle = 718 PgTypeArrCircle = 719 PgTypeMacaddr8 = 774 PgTypeArrMacaddr8 = 775 PgTypeMoney = 790 PgTypeArrMoney = 791 PgTypeMacaddr = 829 PgTypeInet = 869 PgTypeArrBool = 1000 PgTypeArrBytea = 1001 PgTypeArrChar = 1002 PgTypeArrName = 1003 PgTypeArrInt2 = 1005 PgTypeArrInt2vector = 1006 PgTypeArrInt4 = 1007 PgTypeArrRegproc = 1008 PgTypeArrText = 1009 PgTypeArrTid = 1010 PgTypeArrXid = 1011 PgTypeArrCid = 1012 PgTypeArrOidvector = 1013 PgTypeArrBpchar = 1014 PgTypeArrVarchar = 1015 PgTypeArrInt8 = 1016 PgTypeArrPoint = 1017 PgTypeArrLseg = 1018 PgTypeArrPath = 1019 PgTypeArrBox = 1020 PgTypeArrFloat4 = 1021 PgTypeArrFloat8 = 1022 PgTypeArrAbstime = 1023 PgTypeArrReltime = 1024 PgTypeArrTinterval = 1025 PgTypeArrPolygon = 1027 PgTypeArrOid = 1028 PgTypeAclitem = 1033 PgTypeArrAclitem = 1034 PgTypeArrMacaddr = 1040 PgTypeArrInet = 1041 PgTypeBpchar = 1042 PgTypeVarchar = 1043 PgTypeDate = 1082 PgTypeTime = 1083 PgTypeTimestamp = 1114 PgTypeArrTimestamp = 1115 PgTypeArrDate = 1182 PgTypeArrTime = 1183 PgTypeTimestamptz = 1184 PgTypeArrTimestamptz = 1185 PgTypeInterval = 1186 PgTypeArrInterval = 1187 PgTypeArrNumeric = 1231 PgTypePgDatabase = 1248 PgTypeArrCstring = 1263 PgTypeTimetz = 1266 PgTypeArrTimetz = 1270 PgTypeBit = 1560 PgTypeArrBit = 1561 PgTypeVarbit = 1562 PgTypeArrVarbit = 1563 PgTypeNumeric = 1700 PgTypeRefcursor = 1790 PgTypeArrRefcursor = 2201 PgTypeRegprocedure = 2202 PgTypeRegoper = 2203 PgTypeRegoperator = 2204 PgTypeRegclass = 2205 PgTypeRegtype = 2206 PgTypeArrRegprocedure = 2207 PgTypeArrRegoper = 2208 PgTypeArrRegoperator = 2209 PgTypeArrRegclass = 2210 PgTypeArrRegtype = 2211 PgTypeRecord = 2249 PgTypeCstring = 2275 PgTypeAny = 2276 PgTypeAnyarray = 2277 PgTypeVoid = 2278 PgTypeTrigger = 2279 PgTypeLanguageHandler = 2280 PgTypeInternal = 2281 PgTypeOpaque = 2282 PgTypeAnyelement = 2283 PgTypeArrRecord = 2287 PgTypeAnynonarray = 2776 PgTypePgAuthid = 2842 PgTypePgAuthMembers = 2843 PgTypeArrTxidSnapshot = 2949 PgTypeUuid = 2950 PgTypeArrUuid = 2951 PgTypeTxidSnapshot = 2970 PgTypeFdwHandler = 3115 PgTypePgLsn = 3220 PgTypeArrPgLsn = 3221 PgTypeTsmHandler = 3310 PgTypePgNdistinct = 3361 PgTypePgDependencies = 3402 PgTypeAnyenum = 3500 PgTypeTsvector = 3614 PgTypeTsquery = 3615 PgTypeGtsvector = 3642 PgTypeArrTsvector = 3643 PgTypeArrGtsvector = 3644 PgTypeArrTsquery = 3645 PgTypeRegconfig = 3734 PgTypeArrRegconfig = 3735 PgTypeRegdictionary = 3769 PgTypeArrRegdictionary = 3770 PgTypeJsonb = 3802 PgTypeArrJsonb = 3807 PgTypeAnyrange = 3831 PgTypeEventTrigger = 3838 PgTypeInt4range = 3904 PgTypeArrInt4range = 3905 PgTypeNumrange = 3906 PgTypeArrNumrange = 3907 PgTypeTsrange = 3908 PgTypeArrTsrange = 3909 PgTypeTstzrange = 3910 PgTypeArrTstzrange = 3911 PgTypeDaterange = 3912 PgTypeArrDaterange = 3913 PgTypeInt8range = 3926 PgTypeArrInt8range = 3927 PgTypePgShseclabel = 4066 PgTypeRegnamespace = 4089 PgTypeArrRegnamespace = 4090 PgTypeRegrole = 4096 PgTypeArrRegrole = 4097 PgTypePgSubscription = 6101 )
View Source
const ( AuthTypeOk uint32 = 0 AuthTypePwd uint32 = 3 AuthTypeMd5 uint32 = 5 AuthTypeSASL uint32 = 10 AuthTypeSASLContinue uint32 = 11 AuthSASLSCRAMSHA256 string = "SCRAM-SHA-256" AuthSASLSCRAMSHA256PLUS string = "SCRAM-SHA-256-PLUS" )
View Source
const ( CopyFormatText uint8 = 0 CopyFormatBinary uint8 = 1 )
Variables ¶
View Source
var PgTypeMap = map[PgType]string{}/* 172 elements not displayed */
Functions ¶
This section is empty.
Types ¶
type AuthRequest ¶
type AuthRequest struct {
*Data
}
func (*AuthRequest) GetMd5Salt ¶
func (ar *AuthRequest) GetMd5Salt() []byte
func (*AuthRequest) GetSASLAuthData ¶
func (ar *AuthRequest) GetSASLAuthData() []byte
func (*AuthRequest) GetSASLAuthMechanism ¶
func (ar *AuthRequest) GetSASLAuthMechanism() string
func (*AuthRequest) GetType ¶
func (ar *AuthRequest) GetType() uint32
type AuthResponse ¶
type AuthResponse struct {
*Data
}
func NewAuthResponse ¶
func NewAuthResponse() *AuthResponse
func (*AuthResponse) Md5Pwd ¶
func (ar *AuthResponse) Md5Pwd(user, pwd, salt string)
func (*AuthResponse) Password ¶
func (ar *AuthResponse) Password(str string)
type AuthSASLInitialResponse ¶
type AuthSASLInitialResponse struct {
*Data
}
func NewAuthSASLInitialResponse ¶
func NewAuthSASLInitialResponse() *AuthSASLInitialResponse
func (*AuthSASLInitialResponse) AuthResponse ¶
func (ar *AuthSASLInitialResponse) AuthResponse(str string)
func (*AuthSASLInitialResponse) Mechanism ¶
func (ar *AuthSASLInitialResponse) Mechanism(str string)
type AuthSASLResponse ¶
type AuthSASLResponse struct {
*Data
}
func NewAuthSASLResponse ¶
func NewAuthSASLResponse() *AuthSASLResponse
func (*AuthSASLResponse) AuthResponse ¶
func (ar *AuthSASLResponse) AuthResponse(raw []byte)
type BackendKeyData ¶
func (*BackendKeyData) Decode ¶
func (bkd *BackendKeyData) Decode()
type BindCompletion ¶
type BindCompletion struct {
*Data
}
type CloseComplete ¶
type CloseComplete struct {
*Data
}
type CommandCompletion ¶
type CommandCompletion struct {
*Data
}
func (*CommandCompletion) Affected ¶
func (cc *CommandCompletion) Affected() (n int)
type CopyCompletion ¶
type CopyCompletion struct {
*Data
}
type CopyFormat ¶
type CopyFormat uint8
type CopyInResponse ¶
type CopyInResponse struct { *Data Format CopyFormat ColumnLength uint16 }
func (*CopyInResponse) Decode ¶
func (cir *CopyInResponse) Decode()
type CopyOutResponse ¶
type CopyOutResponse struct { *Data Format CopyFormat ColumnLength uint16 ColumnFormats []CopyFormat }
func (*CopyOutResponse) Decode ¶
func (cor *CopyOutResponse) Decode()
type Data ¶
type Data struct { Name byte // contains filtered or unexported fields }
func NewCancelRequest ¶
func NewCloseStat ¶
func NewDescribe ¶
func NewExecute ¶
func NewExecute() *Data
func NewSSLRequest ¶
func NewSSLRequest() *Data
func NewSimpleQuery ¶
func NewTermination ¶
func NewTermination() *Data
func (*Data) WriteUint8 ¶
type Decoder ¶
func NewDecoder ¶
type EmptyQueryResponse ¶
type EmptyQueryResponse struct {
*Data
}
type NoticeResponse ¶
type NoticeResponse struct {
Error
}
func (NoticeResponse) Log ¶
func (nr NoticeResponse) Log()
type Notification ¶
func (*Notification) Decode ¶
func (n *Notification) Decode()
type ParameterDescription ¶
func (*ParameterDescription) Decode ¶
func (pd *ParameterDescription) Decode()
type ParameterStatus ¶
func (*ParameterStatus) Decode ¶
func (ps *ParameterStatus) Decode()
type ParseCompletion ¶
type ParseCompletion struct {
*Data
}
type PgError ¶
type PgError struct { LocalError string `json:"local_error,omitempty"` Fail string `json:"error,omitempty"` Code string `json:"code,omitempty"` Message string `json:"message,omitempty"` Detail string `json:"detail,omitempty"` Hint string `json:"hint,omitempty"` Position string `json:"position,omitempty"` InternalPosition string `json:"internal_position,omitempty"` InternalQuery string `json:"internal_query,omitempty"` Where string `json:"where,omitempty"` Schema string `json:"schema,omitempty"` Table string `json:"table,omitempty"` Column string `json:"Column,omitempty"` DateType string `json:"date_type,omitempty"` Constraint string `json:"constraint,omitempty"` File string `json:"file,omitempty"` Line string `json:"line,omitempty"` Routine string `json:"routine,omitempty"` }
type ReadyForQuery ¶
type ReadyForQuery struct {
*Data
}
type RowDescription ¶
func (*RowDescription) Decode ¶
func (rd *RowDescription) Decode()
type SSLRequest ¶
type SSLRequest Data
type TransactionStatus ¶
type TransactionStatus byte
Source Files ¶
- constants.go
- decoder.go
- encoder.go
- frame.go
- frame_auth_request.go
- frame_auth_response.go
- frame_auth_sasl_initial_response.go
- frame_auth_sasl_response.go
- frame_bakend_key_data.go
- frame_bind.go
- frame_command_completion.go
- frame_copy_in_response.go
- frame_copy_out_response.go
- frame_date_row.go
- frame_error.go
- frame_notice_response.go
- frame_notification.go
- frame_parameter_description.go
- frame_parameter_status.go
- frame_row_description.go
- frame_startup.go
- frames.go
Click to show internal directories.
Click to hide internal directories.