Versions in this module Expand all Collapse all v0 v0.4.3 Mar 29, 2023 Changes in this version + 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 IsError(ret api.SQLRETURN) 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 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(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) 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) + 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() 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 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() 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