Documentation ¶
Overview ¶
Package odbc implements database/sql driver to access data via odbc interface.
Index ¶
- func IsError(ret api.SQLRETURN) bool
- func NewError(apiName string, handle interface{}) error
- func ToHandleAndType(handle interface{}) (h api.SQLHANDLE, ht api.SQLSMALLINT)
- type BaseColumn
- type BindableColumn
- type BufferLen
- type Column
- type Conn
- type DiagRecord
- type Driver
- type Error
- type NonBindableColumn
- type ODBCStmt
- type Parameter
- type Result
- type Rows
- type Stats
- type Stmt
- type Tx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToHandleAndType ¶
func ToHandleAndType(handle interface{}) (h api.SQLHANDLE, ht api.SQLSMALLINT)
Types ¶
type BaseColumn ¶
type BaseColumn struct { CType api.SQLSMALLINT // contains filtered or unexported fields }
BaseColumn implements common column functionality.
func (*BaseColumn) Name ¶
func (c *BaseColumn) Name() string
type BindableColumn ¶
type BindableColumn struct { *BaseColumn IsBound bool IsVariableWidth bool Size int Len BufferLen Buffer []byte }
BindableColumn allows access to columns that can have their buffers bound. Once bound at start, they are written to by odbc driver every time it fetches new row. This saves on syscall and, perhaps, some buffer copying. BindableColumn can be left unbound, then it behaves like NonBindableColumn when user reads data from it.
func NewBindableColumn ¶
func NewBindableColumn(b *BaseColumn, ctype api.SQLSMALLINT, bufSize int) *BindableColumn
type Column ¶
type Column interface { Name() string Bind(h api.SQLHSTMT, idx int) (bool, error) Value(h api.SQLHSTMT, idx int) (driver.Value, error) }
Column provides access to row columns.
func NewVariableWidthColumn ¶
func NewVariableWidthColumn(b *BaseColumn, ctype api.SQLSMALLINT, colWidth api.SQLULEN) Column
type DiagRecord ¶
func (*DiagRecord) String ¶
func (r *DiagRecord) String() string
type Error ¶
type Error struct { APIName string Diag []DiagRecord }
type NonBindableColumn ¶
type NonBindableColumn struct {
*BaseColumn
}
NonBindableColumn provide access to columns, that can't be bound. These are of character or binary type, and, usually, there is no limit for their width.
type ODBCStmt ¶
type ODBCStmt struct { Parameters []Parameter Cols []Column // contains filtered or unexported fields }
func (*ODBCStmt) BindColumns ¶
type Parameter ¶
type Parameter struct { SQLType api.SQLSMALLINT Decimal api.SQLSMALLINT Size api.SQLULEN // Following fields store data used later by SQLExecute. // The fields keep data alive and away from gc. Data interface{} StrLen_or_IndPtr api.SQLLEN // contains filtered or unexported fields }
type Result ¶
type Result struct {
// contains filtered or unexported fields
}
func (*Result) LastInsertId ¶
func (*Result) RowsAffected ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.