Documentation ¶
Index ¶
- Constants
- Variables
- func AuthRequestCmd(username string, password string, dbname string, program string, ...) []byte
- func BytesToPrivateKey(raw []byte, password []byte) (*rsa.PrivateKey, error)
- func BytesToPublicKey(raw []byte) (*rsa.PublicKey, error)
- func CLOSE_CSR_CMD(v uint32) []byte
- func CLOSE_LOB_CMD(v uint32) []byte
- func CLOSE_SESSION_CMD(v uint32) []byte
- func CLOSE_TID_CMD() []byte
- func CLOSE_XA_CMD(v uint32) []byte
- func CMDtail(writer *ByteWriter) []byte
- func CommitCMD() []byte
- func DecodeDouble(inputData []byte) float64
- func DecodeInt(inputData []byte) int64
- func DecodeNumber(inputData []byte) interface{}
- func DecodePadString(size uint32, data []byte) []byte
- func DecryptWithPrivateKey(ciphertext []byte, priv *rsa.PrivateKey) ([]byte, error)
- func EncodeFloat(num float64, bitSize int) ([]byte, error)
- func EncodeInt(val int) []byte
- func EncodeInt64(val int64) []byte
- func EncodePadString(data []byte) []byte
- func EncodeUint64(val uint64) []byte
- func EncryptWithPublicKey(plainText []byte, publickey *rsa.PublicKey) []byte
- func FormatPEM(public_key string) []byte
- func FromNumber(inputData []byte) (mantissa uint64, negative bool, exponent int, mantissaDigits int, err error)
- func PKExchangeCmd() []byte
- func PrepareStatementCMD(sql string, autoComit uint32, prefetch uint32, flag bool)
- func PrintHex(tag string, data []byte)
- func RSA_Encrypt(plainText []byte, publickey []byte) ([]byte, error)
- func ReadMsg(reader *ByteReader) (*Message, *EReply)
- func RollbackCMD(str string) []byte
- func SQLCMD(autoComit uint32, prefetch uint32, sql string) []byte
- func ToNumber(mantissa []byte, negative bool, exponent int) []byte
- func UDecodeString(decorder *encoding.Decoder, size uint32, data []byte, atEOF bool) []byte
- type ByteReader
- type ByteWriter
- func (writer *ByteWriter) Data() []byte
- func (writer *ByteWriter) InsertBig32(val uint32, start uint32)
- func (writer *ByteWriter) Size() uint32
- func (writer *ByteWriter) WriteBig32(val uint32)
- func (writer *ByteWriter) WriteBig64(val uint64)
- func (writer *ByteWriter) WriteByte(val byte)
- func (writer *ByteWriter) WriteCLNT(size uint32, params []*TbclntInfoParam)
- func (writer *ByteWriter) WriteDBFloat(val float64, bitSize int)
- func (writer *ByteWriter) WriteDBInteger(val int64)
- func (writer *ByteWriter) WriteDBMinLenString(val string)
- func (writer *ByteWriter) WriteDBString(val string)
- func (writer *ByteWriter) WriteDate(ti *time.Time)
- func (writer *ByteWriter) WriteNLS(size uint32, params []*TbclntInfoParam)
- func (writer *ByteWriter) WriteTimestamp(ti *time.Time)
- type BytesBinder
- type ConnectMessage
- type DBByte32
- type DBServer
- type DateBinder
- type Deserializable
- type EReply
- type Float32Binder
- type Float64Binder
- type FloatScan
- type IntegerBinder
- type IntegerScan
- type Message
- type OkReply
- type PKExchangeMessage
- type ParamBinder
- type PrepareStatement
- type RsetType
- type SQLException
- type Serializable
- type SessionInfoMessage
- type Singleton
- type StringBinder
- type StringScan
- type TConnector
- func (connector *TConnector) Begin() (driver.Tx, error)
- func (connector *TConnector) Close() error
- func (connector *TConnector) Commit() error
- func (connector *TConnector) Connect(context.Context) (driver.Conn, error)
- func (connector *TConnector) Driver() driver.Driver
- func (connector *TConnector) Prepare(query string) (driver.Stmt, error)
- func (connector *TConnector) Rollback() error
- type TbColumnDesc
- type TbMsgExecuteCountReply
- type TbMsgExecutePrefetchReply
- type TbResultSet
- type TbTimestamp
- type TbclntInfoParam
- type Tibero
- type TiberoDSN
- type TiberoDriver
- type Tibero_CMD_CODE
- type TimestampBinder
- type TimestempScan
Constants ¶
View Source
const ( TYPE_FORWARD_ONLY uint32 = 1003 TYPE_SCROLL_INSENSITIVE = 1004 TYPE_SCROLL_SENSITIVE = 1005 CONCUR_READ_ONLY = 1007 CONCUR_UPDATABLE = 1008 )
Variables ¶
View Source
var NEGATIVE_FLAG byte = 0xF0
View Source
var NUM_OFFSET byte = 0x80
View Source
var RTFWRD = &RsetType{1, 1003, 1007}
View Source
var RTFWUP = &RsetType{2, 1003, 1008}
View Source
var RTSIRD = &RsetType{3, 1004, 1007}
View Source
var RTSIUP = &RsetType{4, 1004, 1008}
View Source
var RTSSRD = &RsetType{5, 1005, 1008}
View Source
var RTSSUP = &RsetType{6, 1005, 1007}
View Source
var RTTNULL = &RsetType{0, -1, -1}
View Source
var TB_VERBOSE = false
Functions ¶
func AuthRequestCmd ¶
func AuthRequestCmd(username string, password string, dbname string, program string, publicK []byte) []byte
AUTH_REQ_WITH_VER
func BytesToPrivateKey ¶
func BytesToPrivateKey(raw []byte, password []byte) (*rsa.PrivateKey, error)
func CLOSE_CSR_CMD ¶
func CLOSE_LOB_CMD ¶
func CLOSE_SESSION_CMD ¶
func CLOSE_TID_CMD ¶
func CLOSE_TID_CMD() []byte
func CLOSE_XA_CMD ¶
func CMDtail ¶
func CMDtail(writer *ByteWriter) []byte
func DecodeDouble ¶
func DecodeNumber ¶
func DecodeNumber(inputData []byte) interface{}
func DecodePadString ¶
func DecryptWithPrivateKey ¶
func DecryptWithPrivateKey(ciphertext []byte, priv *rsa.PrivateKey) ([]byte, error)
func EncodeInt64 ¶
func EncodePadString ¶
func EncodeUint64 ¶
func EncryptWithPublicKey ¶
func FromNumber ¶
func PKExchangeCmd ¶
func PKExchangeCmd() []byte
func PrepareStatementCMD ¶
func ReadMsg ¶
func ReadMsg(reader *ByteReader) (*Message, *EReply)
func RollbackCMD ¶
Types ¶
type ByteReader ¶
type ByteReader struct { Cur uint32 Data []byte Total uint32 // contains filtered or unexported fields }
func CreateReader ¶
func CreateReader(reader io.Reader, data []byte, offset int) *ByteReader
func (*ByteReader) ReadDBString ¶
func (reader *ByteReader) ReadDBString() string
type ByteWriter ¶
type ByteWriter struct {
// contains filtered or unexported fields
}
func CreateWriter ¶
func CreateWriter() *ByteWriter
func (*ByteWriter) Data ¶
func (writer *ByteWriter) Data() []byte
func (*ByteWriter) InsertBig32 ¶
func (writer *ByteWriter) InsertBig32(val uint32, start uint32)
func (*ByteWriter) Size ¶
func (writer *ByteWriter) Size() uint32
func (*ByteWriter) WriteBig32 ¶
func (writer *ByteWriter) WriteBig32(val uint32)
func (*ByteWriter) WriteBig64 ¶
func (writer *ByteWriter) WriteBig64(val uint64)
func (*ByteWriter) WriteByte ¶
func (writer *ByteWriter) WriteByte(val byte)
func (*ByteWriter) WriteCLNT ¶
func (writer *ByteWriter) WriteCLNT(size uint32, params []*TbclntInfoParam)
func (*ByteWriter) WriteDBFloat ¶
func (writer *ByteWriter) WriteDBFloat(val float64, bitSize int)
func (*ByteWriter) WriteDBInteger ¶
func (writer *ByteWriter) WriteDBInteger(val int64)
func (*ByteWriter) WriteDBMinLenString ¶
func (writer *ByteWriter) WriteDBMinLenString(val string)
func (*ByteWriter) WriteDBString ¶
func (writer *ByteWriter) WriteDBString(val string)
func (*ByteWriter) WriteDate ¶
func (writer *ByteWriter) WriteDate(ti *time.Time)
func (*ByteWriter) WriteNLS ¶
func (writer *ByteWriter) WriteNLS(size uint32, params []*TbclntInfoParam)
func (*ByteWriter) WriteTimestamp ¶
func (writer *ByteWriter) WriteTimestamp(ti *time.Time)
type BytesBinder ¶
type BytesBinder []byte
type ConnectMessage ¶
type ConnectMessage struct { *Message // contains filtered or unexported fields }
type DateBinder ¶
type Deserializable ¶
type Deserializable interface {
// contains filtered or unexported methods
}
type Float32Binder ¶
type Float32Binder float32
type Float64Binder ¶
type Float64Binder float64
type IntegerBinder ¶
type IntegerBinder int64
type IntegerScan ¶
type IntegerScan int64
type Message ¶
func (*Message) DeserializeFromBytes ¶
type PKExchangeMessage ¶
type ParamBinder ¶
type ParamBinder interface {
// contains filtered or unexported methods
}
type PrepareStatement ¶
type PrepareStatement struct {
// contains filtered or unexported fields
}
func (*PrepareStatement) Close ¶
func (ps *PrepareStatement) Close() error
func (*PrepareStatement) NumInput ¶
func (ps *PrepareStatement) NumInput() int
type SQLException ¶
type SQLException struct {
// contains filtered or unexported fields
}
type Serializable ¶
type Serializable interface {
// contains filtered or unexported methods
}
type SessionInfoMessage ¶
type SessionInfoMessage struct { *Message // contains filtered or unexported fields }
type StringBinder ¶
type StringBinder string
type StringScan ¶
type StringScan string
type TConnector ¶
type TConnector struct { *TiberoDriver // contains filtered or unexported fields }
func (*TConnector) Close ¶
func (connector *TConnector) Close() error
func (*TConnector) Commit ¶
func (connector *TConnector) Commit() error
func (*TConnector) Driver ¶
func (connector *TConnector) Driver() driver.Driver
func (*TConnector) Prepare ¶
func (connector *TConnector) Prepare(query string) (driver.Stmt, error)
func (*TConnector) Rollback ¶
func (connector *TConnector) Rollback() error
type TbColumnDesc ¶
type TbColumnDesc struct {
// contains filtered or unexported fields
}
type TbMsgExecuteCountReply ¶
type TbMsgExecuteCountReply struct { *Message // contains filtered or unexported fields }
func (*TbMsgExecuteCountReply) LastInsertId ¶
func (reply *TbMsgExecuteCountReply) LastInsertId() (int64, error)
func (*TbMsgExecuteCountReply) RowsAffected ¶
func (reply *TbMsgExecuteCountReply) RowsAffected() (int64, error)
type TbMsgExecutePrefetchReply ¶
type TbMsgExecutePrefetchReply struct { *Message // contains filtered or unexported fields }
func (*TbMsgExecutePrefetchReply) Close ¶
func (msg *TbMsgExecutePrefetchReply) Close() error
func (*TbMsgExecutePrefetchReply) Columns ¶
func (msg *TbMsgExecutePrefetchReply) Columns() []string
type TbResultSet ¶
type TbResultSet struct {
// contains filtered or unexported fields
}
func (*TbResultSet) Scan ¶
func (rs *TbResultSet) Scan(param ...any)
type TbTimestamp ¶
type TbTimestamp [12]byte
type TbclntInfoParam ¶
type Tibero ¶
type Tibero struct { DBServer // contains filtered or unexported fields }
func CreateTibero ¶
type TiberoDSN ¶
type TiberoDSN struct {
// contains filtered or unexported fields
}
func DsnConvert ¶
type TiberoDriver ¶
type TiberoDriver struct{}
func (*TiberoDriver) OpenConnector ¶
func (driver *TiberoDriver) OpenConnector(dsn string) (driver.Connector, error)
type Tibero_CMD_CODE ¶
type Tibero_CMD_CODE uint32
const ( CLOSE_CSR Tibero_CMD_CODE = 22 CLOSE_SESSION Tibero_CMD_CODE = 28 CLOSE_LOB Tibero_CMD_CODE = 50 CLOSE_XA Tibero_CMD_CODE = 67 CLOSE_TID Tibero_CMD_CODE = 226 )
type TimestampBinder ¶
type TimestempScan ¶
type TimestempScan [12]byte
Click to show internal directories.
Click to hide internal directories.