Versions in this module Expand all Collapse all v0 v0.0.40 Aug 30, 2023 v0.0.39 Aug 29, 2023 Changes in this version + var DB2SpecialResigers map[string]func([]byte) []byte = map[string]func([]byte) []byte + var DateFormat string = "2006-01-02" + var SPParamDataTypes map[string]string = map[string]string + var SPParamDateTypes map[string]string = map[string]string + var SPParamIntegerTypes map[string]string = map[string]string + var SPParamNumericTypes map[string]string = map[string]string + var SPParamStringTypes map[string]string = map[string]string + var TimeFormat string = "15:04:05" + var TimestampFormat string = "2006-01-02 15:04:05.000000" + func CURRENT_DATE(x []byte) []byte + func CURRENT_TIME(x []byte) []byte + func ConvertAssign(dest, src interface{}) error + func CreateDb(dbname string, connStr string, options ...string) (bool, error) + func DropDb(dbname string, connStr string) (bool, error) + func Dummy(x []byte) []byte + func GetSepecialValue(name string, param []byte) []byte + func IsError(ret api.SQLRETURN) bool + func IsSepecialRegister(name string) bool + func NewError(apiName string, handle interface{}) error + func SqltoCtype(sqltype api.SQLSMALLINT) api.SQLSMALLINT + func ToHandleAndType(handle interface{}) (h api.SQLHANDLE, ht api.SQLSMALLINT) + type BaseColumn struct + CType api.SQLSMALLINT + SType api.SQLSMALLINT + func (c *BaseColumn) Name() string + func (c *BaseColumn) TypeScan() reflect.Type + func (c *BaseColumn) Value(buf []byte) (driver.Value, error) + type BindableColumn struct + Buffer []byte + IsBound bool + IsVariableWidth bool + Len BufferLen + Size int + func NewBindableColumn(b *BaseColumn, ctype api.SQLSMALLINT, bufSize int) *BindableColumn + func (c *BindableColumn) Bind(h api.SQLHSTMT, idx int) (bool, error) + func (c *BindableColumn) Value(h api.SQLHSTMT, idx int) (driver.Value, error) + type BufferLen api.SQLLEN + func (l *BufferLen) Bind(h api.SQLHSTMT, idx int, ctype api.SQLSMALLINT, buf []byte) api.SQLRETURN + func (l *BufferLen) GetData(h api.SQLHSTMT, idx int, ctype api.SQLSMALLINT, buf []byte) api.SQLRETURN + func (l *BufferLen) IsNull() bool + type Col struct + Index int + Name string + Type reflect.Type + Value any + func (c *Col) AssignValueByType() + type Column interface + Bind func(h api.SQLHSTMT, idx int) (bool, error) + Name func() string + TypeScan func() reflect.Type + Value func(h api.SQLHSTMT, idx int) (driver.Value, error) + func NewColumn(ctx context.Context, h api.SQLHSTMT, idx int) (Column, error) + func NewVariableWidthColumn(b *BaseColumn, ctype api.SQLSMALLINT, colWidth api.SQLULEN) Column + type Conn struct + func (c *Conn) Begin() (driver.Tx, error) + func (c *Conn) Close() error + func (c *Conn) Ping(ctx context.Context) error + func (c *Conn) Prepare(query string) (driver.Stmt, error) + func (c *Conn) PrepareContext(ctx context.Context, query string) (driver.Stmt, error) + func (c *Conn) PrepareODBCStmt(query string) (*ODBCStmt, error) + func (c *Conn) Query(query string, args []driver.Value) (driver.Rows, error) + func (c *Conn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error) + type ContextKey string + const DUMMY_SP_CALL + const ESCAPE_QUOTE + const LABEL_IN_COL_NAME + const LOAD_SP_RESULT_SETS + const SQL_TO_PING + type DBP struct + func (d *DBP) Close() + func (d *DBP) Timeout() + type DiagRecord struct + Message string + NativeError int + State string + func (r *DiagRecord) String() string + type Driver struct + func (d *Driver) Close() error + func (d *Driver) Open(dsn string) (driver.Conn, error) + type Error struct + APIName string + Diag []DiagRecord + func (e *Error) Error() string + type NonBindableColumn struct + func (c *NonBindableColumn) Bind(h api.SQLHSTMT, idx int) (bool, error) + func (c *NonBindableColumn) Value(h api.SQLHSTMT, idx int) (driver.Value, error) + type ODBCStmt struct + Cols []Column + Parameters []Parameter + func (s *ODBCStmt) BindColumns(ctx context.Context) error + func (s *ODBCStmt) Exec(args []driver.Value) error + type Out struct + func (o *Out) ConvertAssign() error + func (o *Out) Value() (driver.Value, error) + type Parameter struct + Data interface{} + Decimal api.SQLSMALLINT + Outs []*Out + SQLType api.SQLSMALLINT + Size api.SQLULEN + StrLen_or_IndPtr api.SQLLEN + func ExtractParameters(h api.SQLHSTMT) ([]Parameter, error) + func (p *Parameter) BindValue(h api.SQLHSTMT, idx int, v driver.Value) error + func (p *Parameter) StoreStrLen_or_IndPtr(v api.SQLLEN) *api.SQLLEN + type Pool struct + func Pconnect(poolSize string) *Pool + func (p *Pool) Display() + func (p *Pool) Init(numConn int, connStr string) bool + func (p *Pool) Open(connStr string, options ...string) *DBP + func (p *Pool) Release() + func (p *Pool) SetConnMaxLifetime(num int) + type ROWID int64 + type RSRows []Col + func (r RSRows) ToMap() map[string]any + type Result struct + func (r *Result) LastInsertId() (int64, error) + func (r *Result) RowsAffected() (int64, error) + type Rows struct + func (r *Rows) Close() error + func (r *Rows) ColumnTypeDatabaseTypeName(index int) string + func (r *Rows) ColumnTypeLength(index int) (length int64, ok bool) + func (r *Rows) ColumnTypeNullable(index int) (nullable, ok bool) + func (r *Rows) ColumnTypePrecisionScale(index int) (precision, scale int64, ok bool) + func (r *Rows) ColumnTypeScanType(index int) reflect.Type + func (r *Rows) Columns() []string + func (r *Rows) HasNextResultSet() bool + func (r *Rows) Next(dest []driver.Value) error + func (r *Rows) NextResultSet(ctx context.Context) error + type Stats struct + ConnCount int + EnvCount int + StmtCount int + type Stmt struct + func (s *Stmt) CheckNamedValue(nv *driver.NamedValue) (err error) + func (s *Stmt) Close() error + func (s *Stmt) Exec(args []driver.Value) (driver.Result, error) + func (s *Stmt) ExecContext(ctx context.Context, args []driver.NamedValue) (driver.Result, error) + func (s *Stmt) NumInput() int + func (s *Stmt) Query(args []driver.Value) (driver.Rows, error) + func (s *Stmt) QueryContext(ctx context.Context, args []driver.NamedValue) (driver.Rows, error) + type Tx struct + func (tx *Tx) Commit() error + func (tx *Tx) Rollback() error