Documentation ¶
Overview ¶
Package protocol implements the hdb command network protocol.
http://help.sap.com/hana/SAP_HANA_SQL_Command_Network_Protocol_Reference_en.pdf
Index ¶
- Constants
- Variables
- func IsSupportedDfv(dfv int) bool
- func RegisterScanType(dt DataType, scanType reflect.Type) bool
- func SupportedDfvs(defaultOnly bool) []int
- type AuthCookieGetter
- type AuthFinalReply
- type AuthFinalRequest
- type AuthHnd
- func (a *AuthHnd) AddBasic(username, password string)
- func (a *AuthHnd) AddJWT(token string)
- func (a *AuthHnd) AddSessionCookie(cookie []byte, logonname, clientID string)
- func (a *AuthHnd) AddX509(certKey *x509.CertKey)
- func (a *AuthHnd) FinalReply() (*AuthFinalReply, error)
- func (a *AuthHnd) FinalRequest() (*AuthFinalRequest, error)
- func (a *AuthHnd) InitReply() (*AuthInitReply, error)
- func (a *AuthHnd) InitRequest() (*AuthInitRequest, error)
- func (a *AuthHnd) Method() auth.Method
- func (a *AuthHnd) String() string
- type AuthInitReply
- type AuthInitRequest
- type Cdm
- type ClientContextOption
- type ClientID
- type Command
- type ConnectOption
- type ConvertError
- type DBConnectInfoType
- type DataType
- type DecodeError
- type DecodeErrors
- type Fetchsize
- type FunctionCode
- type HdbErrors
- func (e *HdbErrors) Code() int
- func (e *HdbErrors) Error() string
- func (e *HdbErrors) ErrorsFunc(fn func(err error))
- func (e *HdbErrors) HasWarnings() bool
- func (e *HdbErrors) IsError() bool
- func (e *HdbErrors) IsFatal() bool
- func (e *HdbErrors) IsWarning() bool
- func (e *HdbErrors) Level() int
- func (e *HdbErrors) NumError() int
- func (e *HdbErrors) Position() int
- func (e *HdbErrors) SetIdx(idx int)
- func (e *HdbErrors) SetStmtNo(idx, no int)
- func (e *HdbErrors) SetStmtsNoOfs(ofs int)
- func (e *HdbErrors) StmtNo() int
- func (e *HdbErrors) String() string
- func (e *HdbErrors) Text() string
- type InputParameters
- type LobDecoderSetter
- type LobInDescr
- type LobOptions
- type LobOutDescr
- type LobScanner
- type LocatorID
- type MessageType
- type Options
- type OutputParameters
- type ParameterField
- func (f *ParameterField) Convert(t transform.Transformer, v any) (any, error)
- func (f *ParameterField) In() bool
- func (f *ParameterField) InOut() bool
- func (f *ParameterField) IsLob() bool
- func (f *ParameterField) Name() string
- func (f *ParameterField) Nullable() bool
- func (f *ParameterField) Out() bool
- func (f *ParameterField) ScanType() reflect.Type
- func (f *ParameterField) String() string
- func (f *ParameterField) TypeLength() (int64, bool)
- func (f *ParameterField) TypeName() string
- func (f *ParameterField) TypePrecisionScale() (int64, int64, bool)
- type ParameterMetadata
- type ParameterMode
- type PartAttributes
- type PartHeader
- type PartKind
- type ReadLobReply
- type ReadLobRequest
- type ReadProvider
- type Reader
- type ResultField
- func (f *ResultField) Name() string
- func (f *ResultField) Nullable() bool
- func (f *ResultField) ScanType() reflect.Type
- func (f *ResultField) String() string
- func (f *ResultField) TypeLength() (int64, bool)
- func (f *ResultField) TypeName() string
- func (f *ResultField) TypePrecisionScale() (int64, int64, bool)
- type ResultMetadata
- type Resultset
- type ResultsetID
- type RowsAffected
- type StatementID
- type WriteLobDescr
- type WriteLobReply
- type WriteLobRequest
- type Writer
Constants ¶
const ( DfvLevel0 int = 0 // base data format DfvLevel1 int = 1 // eval types support all data types DfvLevel2 int = 2 // reserved, broken, do not use DfvLevel3 int = 3 // additional types Longdate, Secondate, Daydate, Secondtime supported for NGAP DfvLevel4 int = 4 // generic support for new date/time types DfvLevel5 int = 5 // spatial types in ODBC on request DfvLevel6 int = 6 // BINTEXT DfvLevel7 int = 7 // with boolean support DfvLevel8 int = 8 // with FIXED8/12/16 support )
Data format version values.
const ( // TcTableRef is the TypeCode for table references. TcTableRef typeCode = 0x7e // 126 // TcTableRows is the TypeCode for table rows. TcTableRows typeCode = 0x7f // 127 )
const (
HdbErrAuthenticationFailed = 10
)
HANA Database errors.
const MaxNumArg = math.MaxInt32
MaxNumArg is the maximum number of arguments allowed to send in a part.
const (
RaExecutionFailed = -3
)
rows affected
Variables ¶
var ErrDecimalOutOfRange = errors.New("decimal out of range error")
ErrDecimalOutOfRange means that a big.Rat exceeds the size of hdb decimal fields.
var ErrFloatOutOfRange = errors.New("float out of range error")
ErrFloatOutOfRange means that a float exceeds the size of the hdb float field.
var ErrIntegerOutOfRange = errors.New("integer out of range error")
ErrIntegerOutOfRange means that an integer exceeds the size of the hdb integer field.
var ErrUint64OutOfRange = errors.New("uint64 values with high bit set are not supported")
ErrUint64OutOfRange means that a uint64 exceeds the size of a int64.
Functions ¶
func IsSupportedDfv ¶ added in v0.107.0
IsSupportedDfv returns true if the data format version dfv is supported by the driver, false otherwise.
func RegisterScanType ¶
RegisterScanType registers driver owned datatype scantypes (e.g. Decimal, Lob).
func SupportedDfvs ¶ added in v0.107.0
SupportedDfvs returns a slice of data format versions supported by the driver. If parameter defaultOnly is set only the default dfv is returned, otherwise all supported dfv values are returned.
Types ¶
type AuthCookieGetter ¶ added in v0.107.0
AuthCookieGetter is implemented by authentication methods supporting cookies to reconnect.
type AuthFinalReply ¶ added in v0.107.3
type AuthFinalReply struct {
// contains filtered or unexported fields
}
AuthFinalReply represents an authentication final reply.
func (*AuthFinalReply) String ¶ added in v0.107.3
func (r *AuthFinalReply) String() string
type AuthFinalRequest ¶ added in v0.107.3
type AuthFinalRequest struct {
// contains filtered or unexported fields
}
AuthFinalRequest represents an authentication final request.
func (*AuthFinalRequest) String ¶ added in v0.107.3
func (r *AuthFinalRequest) String() string
type AuthHnd ¶ added in v0.112.3
type AuthHnd struct {
// contains filtered or unexported fields
}
AuthHnd holds the client authentication methods dependent on the driver.Connector attributes and handles the authentication hdb protocol.
func NewAuthHnd ¶ added in v0.112.3
NewAuthHnd creates a new Auth instance.
func (*AuthHnd) AddSessionCookie ¶ added in v0.112.3
AddSessionCookie adds session cookie authentication method.
func (*AuthHnd) FinalReply ¶ added in v0.112.3
func (a *AuthHnd) FinalReply() (*AuthFinalReply, error)
FinalReply returns the final reply part.
func (*AuthHnd) FinalRequest ¶ added in v0.112.3
func (a *AuthHnd) FinalRequest() (*AuthFinalRequest, error)
FinalRequest returns the final request part.
func (*AuthHnd) InitReply ¶ added in v0.112.3
func (a *AuthHnd) InitReply() (*AuthInitReply, error)
InitReply returns the init reply part.
func (*AuthHnd) InitRequest ¶ added in v0.112.3
func (a *AuthHnd) InitRequest() (*AuthInitRequest, error)
InitRequest returns the init request part.
type AuthInitReply ¶ added in v0.107.3
type AuthInitReply struct {
// contains filtered or unexported fields
}
AuthInitReply represents an authentication initial reply.
func (*AuthInitReply) String ¶ added in v0.107.3
func (r *AuthInitReply) String() string
type AuthInitRequest ¶ added in v0.107.3
type AuthInitRequest struct {
// contains filtered or unexported fields
}
AuthInitRequest represents an authentication initial request.
func (*AuthInitRequest) String ¶ added in v0.107.3
func (r *AuthInitRequest) String() string
type Cdm ¶ added in v0.107.3
type Cdm byte
Cdm represents a ConnectOption ClientDistributionMode.
ConnectOption ClientDistributionMode constants.
type ClientContextOption ¶ added in v0.107.3
type ClientContextOption int8
ClientContextOption represents a client context option.
const ( CcoClientVersion ClientContextOption = 1 CcoClientType ClientContextOption = 2 CcoClientApplicationProgram ClientContextOption = 3 )
ClientContextOption constants.
func (ClientContextOption) String ¶ added in v0.107.3
func (i ClientContextOption) String() string
type Command ¶ added in v0.107.3
type Command []byte
Command represents a command part with cesu8 content.
type ConnectOption ¶ added in v0.107.3
type ConnectOption int8
ConnectOption represents a connect option.
const ( CoCompleteArrayExecution ConnectOption = 2 //!< @deprecated Array execution semantics, always true. CoClientLocale ConnectOption = 3 //!< Client locale information. CoSelectForUpdateSupported ConnectOption = 14 //!< SELECT FOR UPDATE function code understood by client CoClientDistributionMode ConnectOption = 15 //!< client distribution mode CoDistributionProtocolVersion ConnectOption = 17 //!< version of distribution protocol handling (@see DistributionProtocolVersionEnum) CoSplitBatchCommands ConnectOption = 18 //!< permit splitting of batch commands CoDataFormatVersion2 ConnectOption = 23 //!< Version of data format used in communication (as DataFormatVersion used wrongly in old servers) CoFullVersionString ConnectOption = 44 //!< Full version string of the client or server (the sender) (added to hana2sp0) CoDatabaseName ConnectOption = 45 //!< Database name (string) that we connected to (sent by server) (added to hana2sp0) )
ConnectOption constants.
func (ConnectOption) String ¶ added in v0.107.3
func (i ConnectOption) String() string
type ConvertError ¶
type ConvertError struct {
// contains filtered or unexported fields
}
A ConvertError is returned by conversion methods if a go datatype to hdb datatype conversion fails.
func (*ConvertError) Error ¶
func (e *ConvertError) Error() string
func (*ConvertError) Unwrap ¶
func (e *ConvertError) Unwrap() error
Unwrap returns the nested error.
type DBConnectInfoType ¶ added in v0.107.3
type DBConnectInfoType int8
DBConnectInfoType represents a database connect info type.
const ( CiDatabaseName DBConnectInfoType = 1 // string CiHost DBConnectInfoType = 2 // string CiPort DBConnectInfoType = 3 // int4 CiIsConnected DBConnectInfoType = 4 // bool )
DBConnectInfoType constants.
func (DBConnectInfoType) String ¶ added in v0.107.3
func (i DBConnectInfoType) String() string
type DataType ¶
type DataType byte
DataType is the type definition for data types supported by this package.
const ( DtUnknown DataType = iota // unknown data type DtBoolean DtTinyint DtSmallint DtInteger DtBigint DtReal DtDouble DtDecimal DtTime DtString DtBytes DtLob DtRows )
Data type constants.
type DecodeError ¶ added in v0.107.3
type DecodeError struct {
// contains filtered or unexported fields
}
DecodeError represents a decoding error.
func (*DecodeError) Error ¶ added in v0.107.3
func (e *DecodeError) Error() string
type DecodeErrors ¶ added in v0.107.3
type DecodeErrors []*DecodeError
DecodeErrors represents a list of decoding errors.
func (DecodeErrors) RowError ¶ added in v0.107.3
func (errors DecodeErrors) RowError(row int) error
RowError returns an error if one is assigned to a row, nil otherwise.
type FunctionCode ¶ added in v0.107.3
type FunctionCode int16
FunctionCode represents a function code.
const (
FcDDL FunctionCode = 1
)
FunctionCode constants.
func (FunctionCode) IsProcedureCall ¶ added in v0.107.3
func (fc FunctionCode) IsProcedureCall() bool
IsProcedureCall returns true if the function code is a procedure call, false otherwise.
func (FunctionCode) String ¶ added in v0.107.3
func (i FunctionCode) String() string
type HdbErrors ¶ added in v0.107.3
type HdbErrors struct {
// contains filtered or unexported fields
}
HdbErrors represent the collection of errors return by the server.
func (*HdbErrors) ErrorsFunc ¶ added in v0.107.3
ErrorsFunc executes fn on all hdb errors.
func (*HdbErrors) HasWarnings ¶ added in v0.107.3
HasWarnings returns true if the error collection contains warnings, false otherwise.
func (*HdbErrors) SetStmtsNoOfs ¶ added in v0.111.0
SetStmtsNoOfs adds an offset to the statement numbers of the errors (bulk operations).
type InputParameters ¶ added in v0.107.3
type InputParameters struct { InputFields []*ParameterField // contains filtered or unexported fields }
InputParameters represents the set of input parameters.
func NewInputParameters ¶ added in v0.107.3
func NewInputParameters(inputFields []*ParameterField, nvargs []driver.NamedValue, hasLob bool) (*InputParameters, error)
NewInputParameters returns a InputParameters instance.
func (*InputParameters) String ¶ added in v0.107.3
func (p *InputParameters) String() string
type LobDecoderSetter ¶ added in v0.111.2
type LobDecoderSetter interface {
SetDecoder(fn func(descr *LobOutDescr, wr io.Writer) error)
}
LobDecoderSetter is the interface wrapping the setDecoder method for Lob reading.
type LobInDescr ¶ added in v0.107.3
type LobInDescr struct {
// contains filtered or unexported fields
}
LobInDescr represents a lob input descriptor.
func (*LobInDescr) FetchNext ¶ added in v0.107.3
func (d *LobInDescr) FetchNext(chunkSize int) (bool, error)
FetchNext fetches the next lob chunk.
func (*LobInDescr) String ¶ added in v0.107.3
func (d *LobInDescr) String() string
type LobOptions ¶ added in v0.107.3
type LobOptions int8
LobOptions represents a lob option set.
func (LobOptions) IsLastData ¶ added in v0.107.3
func (o LobOptions) IsLastData() bool
IsLastData return true if the last data package was read, false otherwise.
func (LobOptions) String ¶ added in v0.107.3
func (o LobOptions) String() string
type LobOutDescr ¶ added in v0.107.3
type LobOutDescr struct { IsCharBased bool Opt LobOptions NumChar int64 ID LocatorID B []byte // contains filtered or unexported fields }
LobOutDescr represents a lob output descriptor.
func (*LobOutDescr) Scan ¶ added in v0.111.2
func (d *LobOutDescr) Scan(wr io.Writer) error
Scan implements the LobScanner interface.
func (*LobOutDescr) SetDecoder ¶ added in v0.111.2
func (d *LobOutDescr) SetDecoder(decoder func(descr *LobOutDescr, wr io.Writer) error)
SetDecoder implements the LobDecoderSetter interface.
func (*LobOutDescr) String ¶ added in v0.107.3
func (d *LobOutDescr) String() string
type LobScanner ¶ added in v0.111.2
LobScanner is the interface wrapping the Scan method for Lob reading.
type LocatorID ¶ added in v0.107.3
type LocatorID uint64 // byte[locatorIdSize]
LocatorID represents a locotor id.
type MessageType ¶ added in v0.107.3
type MessageType int8
MessageType represents the message type.
const ( MtExecuteDirect MessageType = 2 MtPrepare MessageType = 3 MtExecute MessageType = 13 MtWriteLob MessageType = 16 MtReadLob MessageType = 17 MtAuthenticate MessageType = 65 MtConnect MessageType = 66 MtCommit MessageType = 67 MtRollback MessageType = 68 MtCloseResultset MessageType = 69 MtDropStatementID MessageType = 70 MtFetchNext MessageType = 71 MtDisconnect MessageType = 77 MtDBConnectInfo MessageType = 82 )
MessageType constants.
func (MessageType) ClientInfoSupported ¶ added in v0.107.3
func (mt MessageType) ClientInfoSupported() bool
ClientInfoSupported returns true if message does support client info, false otherwise.
func (MessageType) String ¶ added in v0.107.3
func (i MessageType) String() string
type OutputParameters ¶ added in v0.107.3
type OutputParameters struct { OutputFields []*ParameterField FieldValues []driver.Value DecodeErrors DecodeErrors }
OutputParameters represents the set of output parameters.
func (*OutputParameters) String ¶ added in v0.107.3
func (p *OutputParameters) String() string
type ParameterField ¶
type ParameterField struct {
// contains filtered or unexported fields
}
ParameterField contains database field attributes for parameters.
func NewTableRefParameterField ¶ added in v0.107.4
func NewTableRefParameterField(idx int) *ParameterField
NewTableRefParameterField returns a ParameterField representing a table reference.
func NewTableRowsParameterField ¶ added in v0.107.4
func NewTableRowsParameterField(idx int) *ParameterField
NewTableRowsParameterField returns a ParameterField representing table rows.
func (*ParameterField) Convert ¶
func (f *ParameterField) Convert(t transform.Transformer, v any) (any, error)
Convert returns the result of the fieldType conversion.
func (*ParameterField) In ¶
func (f *ParameterField) In() bool
In returns true if the parameter field is an input field.
func (*ParameterField) InOut ¶ added in v0.109.0
func (f *ParameterField) InOut() bool
InOut returns true if the parameter field is an in,- output field.
func (*ParameterField) IsLob ¶ added in v0.107.4
func (f *ParameterField) IsLob() bool
IsLob returns true if the ParameterField is of type lob, false otherwise.
func (*ParameterField) Name ¶ added in v0.107.3
func (f *ParameterField) Name() string
Name returns the parameter field name.
func (*ParameterField) Nullable ¶ added in v0.107.3
func (f *ParameterField) Nullable() bool
Nullable returns true if the field may be null, false otherwise. see https://golang.org/pkg/database/sql/driver/#RowsColumnTypeNullable
func (*ParameterField) Out ¶
func (f *ParameterField) Out() bool
Out returns true if the parameter field is an output field.
func (*ParameterField) ScanType ¶ added in v0.107.3
func (f *ParameterField) ScanType() reflect.Type
ScanType returns the scan type of the field. see https://golang.org/pkg/database/sql/driver/#RowsColumnTypeScanType
func (*ParameterField) String ¶
func (f *ParameterField) String() string
func (*ParameterField) TypeLength ¶ added in v0.107.3
func (f *ParameterField) TypeLength() (int64, bool)
TypeLength returns the type length of the field. see https://golang.org/pkg/database/sql/driver/#RowsColumnTypeLength
func (*ParameterField) TypeName ¶ added in v0.107.3
func (f *ParameterField) TypeName() string
TypeName returns the type name of the field. see https://golang.org/pkg/database/sql/driver/#RowsColumnTypeDatabaseTypeName
func (*ParameterField) TypePrecisionScale ¶ added in v0.107.3
func (f *ParameterField) TypePrecisionScale() (int64, int64, bool)
TypePrecisionScale returns the type precision and scale (decimal types) of the field. see https://golang.org/pkg/database/sql/driver/#RowsColumnTypePrecisionScale
type ParameterMetadata ¶ added in v0.107.3
type ParameterMetadata struct {
ParameterFields []*ParameterField
}
ParameterMetadata represents the metadata of a parameter.
func (*ParameterMetadata) String ¶ added in v0.107.3
func (m *ParameterMetadata) String() string
type ParameterMode ¶ added in v0.107.3
type ParameterMode int8
ParameterMode represents the parameter mode set.
const ( PmIn ParameterMode = 0x01 PmOut ParameterMode = 0x04 )
ParameterMode constants.
func (ParameterMode) String ¶ added in v0.107.3
func (k ParameterMode) String() string
type PartAttributes ¶ added in v0.107.3
type PartAttributes int8
PartAttributes represents the part attributes.
func (PartAttributes) LastPacket ¶ added in v0.107.3
func (k PartAttributes) LastPacket() bool
LastPacket returns true if the last packet is sent, false otherwise.
func (PartAttributes) ResultsetClosed ¶ added in v0.107.3
func (k PartAttributes) ResultsetClosed() bool
ResultsetClosed returns true if the result set is closed, false otherwise.
func (PartAttributes) String ¶ added in v0.107.3
func (k PartAttributes) String() string
type PartHeader ¶ added in v0.107.3
type PartHeader struct { PartKind PartKind PartAttributes PartAttributes // contains filtered or unexported fields }
PartHeader represents the part header.
func (*PartHeader) String ¶ added in v0.107.3
func (h *PartHeader) String() string
type PartKind ¶ added in v0.107.3
type PartKind int8
PartKind represents the part kind.
const ( PkCommand PartKind = 3 PkResultset PartKind = 5 PkError PartKind = 6 PkStatementID PartKind = 10 PkRowsAffected PartKind = 12 PkResultsetID PartKind = 13 PkTopologyInformation PartKind = 15 PkReadLobRequest PartKind = 17 PkReadLobReply PartKind = 18 PkWriteLobRequest PartKind = 28 PkClientContext PartKind = 29 PkWriteLobReply PartKind = 30 PkParameters PartKind = 32 PkAuthentication PartKind = 33 PkClientID PartKind = 35 PkStatementContext PartKind = 39 PkOutputParameters PartKind = 41 PkConnectOptions PartKind = 42 PkFetchSize PartKind = 45 PkParameterMetadata PartKind = 47 PkResultMetadata PartKind = 48 PkClientInfo PartKind = 57 PkTransactionFlags PartKind = 64 PkDBConnectInfo PartKind = 67 )
PartKind constants.
type ReadLobReply ¶ added in v0.107.3
type ReadLobReply struct { ID LocatorID Opt LobOptions B []byte }
ReadLobReply represents a lob read reply part.
func (*ReadLobReply) String ¶ added in v0.107.3
func (r *ReadLobReply) String() string
type ReadLobRequest ¶ added in v0.107.3
type ReadLobRequest struct { /* read lobs: - read lob field from database in chunks - loop: - readLobRequest - readLobReply - read lob reply seems like readLobreply returns only a result for one lob - even if more then one is requested --> read single lobs */ ID LocatorID Ofs int64 ChunkSize int32 }
ReadLobRequest represents a lob read request part.
func (*ReadLobRequest) String ¶ added in v0.107.3
func (r *ReadLobRequest) String() string
type ReadProvider ¶
ReadProvider is the interface wrapping the Reader which provides an io.Reader.
type Reader ¶ added in v0.107.3
type Reader struct {
// contains filtered or unexported fields
}
Reader represents a protocol reader.
func (*Reader) FunctionCode ¶ added in v0.107.3
func (r *Reader) FunctionCode() FunctionCode
FunctionCode returns the segment header function code.
func (*Reader) IterateParts ¶ added in v0.107.3
func (r *Reader) IterateParts(partFn func(ph *PartHeader)) error
IterateParts is iterating over the parts returned by the server.
func (*Reader) ReadProlog ¶ added in v0.107.3
ReadProlog reads the protocol prolog.
func (*Reader) ReadSkip ¶ added in v0.107.3
ReadSkip reads the server reply without returning the results.
type ResultField ¶ added in v0.107.3
type ResultField struct {
// contains filtered or unexported fields
}
ResultField represents a database result field.
func (*ResultField) Name ¶ added in v0.107.3
func (f *ResultField) Name() string
Name returns the result field name.
func (*ResultField) Nullable ¶ added in v0.107.3
func (f *ResultField) Nullable() bool
Nullable returns true if the field may be null, false otherwise. see https://golang.org/pkg/database/sql/driver/#RowsColumnTypeNullable
func (*ResultField) ScanType ¶ added in v0.107.3
func (f *ResultField) ScanType() reflect.Type
ScanType returns the scan type of the field. see https://golang.org/pkg/database/sql/driver/#RowsColumnTypeScanType
func (*ResultField) String ¶ added in v0.107.3
func (f *ResultField) String() string
String implements the Stringer interface.
func (*ResultField) TypeLength ¶ added in v0.107.3
func (f *ResultField) TypeLength() (int64, bool)
TypeLength returns the type length of the field. see https://golang.org/pkg/database/sql/driver/#RowsColumnTypeLength
func (*ResultField) TypeName ¶ added in v0.107.3
func (f *ResultField) TypeName() string
TypeName returns the type name of the field. see https://golang.org/pkg/database/sql/driver/#RowsColumnTypeDatabaseTypeName
func (*ResultField) TypePrecisionScale ¶ added in v0.107.3
func (f *ResultField) TypePrecisionScale() (int64, int64, bool)
TypePrecisionScale returns the type precision and scale (decimal types) of the field. see https://golang.org/pkg/database/sql/driver/#RowsColumnTypePrecisionScale
type ResultMetadata ¶ added in v0.107.3
type ResultMetadata struct {
ResultFields []*ResultField
}
ResultMetadata represents the metadata of a set of database result fields.
func (*ResultMetadata) String ¶ added in v0.107.3
func (r *ResultMetadata) String() string
type Resultset ¶ added in v0.107.3
type Resultset struct { ResultFields []*ResultField FieldValues []driver.Value DecodeErrors DecodeErrors }
Resultset represents a database result set.
type ResultsetID ¶ added in v0.107.3
type ResultsetID uint64
ResultsetID represents a resultset id.
func (ResultsetID) String ¶ added in v0.107.3
func (id ResultsetID) String() string
type RowsAffected ¶ added in v0.107.3
type RowsAffected []int32
RowsAffected represents a rows affected part.
func (RowsAffected) String ¶ added in v0.107.3
func (r RowsAffected) String() string
func (RowsAffected) Total ¶ added in v0.107.3
func (r RowsAffected) Total() int64
Total return the total number of all affected rows.
type StatementID ¶ added in v0.107.3
type StatementID uint64
StatementID represents the statement id part type.
func (StatementID) String ¶ added in v0.107.3
func (id StatementID) String() string
type WriteLobDescr ¶ added in v0.107.3
type WriteLobDescr struct { LobInDescr *LobInDescr ID LocatorID Opt LobOptions // contains filtered or unexported fields }
WriteLobDescr represents a lob descriptor for writes (lob -> db).
func (*WriteLobDescr) FetchNext ¶ added in v0.107.3
func (d *WriteLobDescr) FetchNext(chunkSize int) error
FetchNext fetches the next lob chunk.
func (WriteLobDescr) String ¶ added in v0.107.3
func (d WriteLobDescr) String() string
type WriteLobReply ¶ added in v0.107.3
type WriteLobReply struct { // write lob fields to db (reply) // - returns ids which have not been written completely IDs []LocatorID }
WriteLobReply represents a lob write reply part.
func (*WriteLobReply) String ¶ added in v0.107.3
func (r *WriteLobReply) String() string
type WriteLobRequest ¶ added in v0.107.3
type WriteLobRequest struct {
Descrs []*WriteLobDescr
}
WriteLobRequest represents a lob write request part.
func (*WriteLobRequest) String ¶ added in v0.107.3
func (r *WriteLobRequest) String() string
type Writer ¶ added in v0.107.3
type Writer struct {
// contains filtered or unexported fields
}
Writer represents a protocol writer.
func NewWriter ¶ added in v0.107.3
func NewWriter(wr *bufio.Writer, encoder func() transform.Transformer, sv map[string]string) *Writer
NewWriter returns an instance of a protocol writer.
func (*Writer) Write ¶ added in v0.107.3
func (w *Writer) Write(sessionID int64, messageType MessageType, commit bool, writers ...partWriter) error
func (*Writer) WriteProlog ¶ added in v0.107.3
WriteProlog writes the protocol prolog.
Source Files ¶
- auth.go
- connectoption.go
- convert.go
- datatype.go
- decodeerror.go
- dfv.go
- doc.go
- error.go
- fieldnames.go
- fieldtype.go
- functioncode.go
- headers.go
- init.go
- keyvaluesparts.go
- lob.go
- messagetype.go
- multioptionsparts.go
- optionsparts.go
- optiontype.go
- parameter.go
- partkind.go
- parts.go
- protocol.go
- protocoltrace.go
- resizeslice.go
- result.go
- rowsaffected.go
- simpleparts.go
- typecode.go
- x_generator.go
- x_stringer.go
Directories ¶
Path | Synopsis |
---|---|
Package auth provides authentication methods.
|
Package auth provides authentication methods. |
Package encoding implements hdb field type en,- and decodings.
|
Package encoding implements hdb field type en,- and decodings. |
Package julian provided julian time conversion functions.
|
Package julian provided julian time conversion functions. |
Package scanner implements a HANA SQL query scanner.
|
Package scanner implements a HANA SQL query scanner. |
Package x509 provides X509 certificate methods.
|
Package x509 provides X509 certificate methods. |