Documentation ¶
Index ¶
- Constants
- Variables
- func OpenHandles() int64
- type Column
- type Concurrency
- type Config
- type Connection
- func (c *Connection) Close() error
- func (c *Connection) Commit() error
- func (c *Connection) Ping() error
- func (c *Connection) Rollback() error
- func (c *Connection) SetAutoCommit(autoCommit bool) error
- func (c *Connection) SetIsolationLevel(level IsolationLevel) error
- func (c *Connection) SetReadOnlyMode(readOnly ReadOnlyMode) error
- func (c *Connection) Statement() (*Statement, error)
- type CursorSensitivity
- type DiagRec
- type Environment
- type Error
- type ErrorMap
- type IsolationLevel
- type PoolOption
- type ReadOnlyMode
- type RecordSet
- func (rs *RecordSet) Close() error
- func (rs *RecordSet) Column(index int) Column
- func (rs *RecordSet) ColumnNames() []string
- func (rs *RecordSet) ColumnWithName(name string) Column
- func (rs *RecordSet) Fetch() (more bool, err error)
- func (rs *RecordSet) Statement() *Statement
- func (rs *RecordSet) Unmarshal(out interface{}) error
- type Statement
- func (s *Statement) BindParams(params ...interface{}) error
- func (s *Statement) Close() error
- func (s *Statement) ExecDirect(ctx context.Context, sql string) error
- func (s *Statement) Execute(ctx context.Context) error
- func (s *Statement) NumParams() (int, error)
- func (s *Statement) Prepare(ctx context.Context, sql string) error
- func (s *Statement) RecordSet() (*RecordSet, error)
- func (s *Statement) ResetParams() error
- func (s *Statement) SetConcurrency(concurrency Concurrency) error
- func (s *Statement) SetCursorSensitivity(sensitivity CursorSensitivity) error
- type TableInfo
- type TableType
- type TypeInfo
- type Version
Constants ¶
View Source
const ( LevelReadCommitted = IsolationLevel(api.SQL_TRANSACTION_READ_COMMITTED) LevelReadUncommitted = IsolationLevel(api.SQL_TRANSACTION_READ_UNCOMMITTED) LevelRepeatableRead = IsolationLevel(api.SQL_TRANSACTION_REPEATABLE_READ) LevelSerializable = IsolationLevel(api.SQL_TRANSACTION_SERIALIZABLE) )
View Source
const ( ModeReadOnly = ReadOnlyMode(api.SQL_MODE_READ_ONLY) ModeReadWrite = ReadOnlyMode(api.SQL_MODE_READ_WRITE) ModeDefault = ReadOnlyMode(api.SQL_MODE_DEFAULT) )
View Source
const ( PoolOff = PoolOption(api.SQL_CP_OFF) PoolPerDriver = PoolOption(api.SQL_CP_ONE_PER_DRIVER) PoolPerEnvironment = PoolOption(api.SQL_CP_ONE_PER_HENV) )
View Source
const ( Version3_80 = Version(api.SQL_OV_ODBC3_80) Version3 = Version(api.SQL_OV_ODBC3) Version2 = Version(api.SQL_OV_ODBC2) )
View Source
const ( CursorSensitive = CursorSensitivity(api.SQL_SENSITIVE) CursorInsensitive = CursorSensitivity(api.SQL_INSENSITIVE) )
View Source
const (
ConcurrencyLock = Concurrency(api.SQL_CONCUR_LOCK)
)
Variables ¶
View Source
var ( ErrConnectionDead = errors.New("connection dead") ErrUnsupportedIsolationLevel = errors.New("isolation level is not supported") )
View Source
var ( ErrInvalidHandle = errors.New("invalid handle") ErrHandleFreed = errors.New("attempt to double free") )
View Source
var (
ErrNotImplemented = errors.New("not implemented")
)
View Source
var (
ErrRecordSetOpen = errors.New("recordset is still open")
)
Functions ¶
func OpenHandles ¶ added in v0.9.3
func OpenHandles() int64
Types ¶
type Concurrency ¶ added in v0.9.0
type Concurrency uint64
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func (*Connection) Close ¶
func (c *Connection) Close() error
func (*Connection) Commit ¶
func (c *Connection) Commit() error
func (*Connection) Ping ¶
func (c *Connection) Ping() error
func (*Connection) Rollback ¶
func (c *Connection) Rollback() error
func (*Connection) SetAutoCommit ¶
func (c *Connection) SetAutoCommit(autoCommit bool) error
func (*Connection) SetIsolationLevel ¶
func (c *Connection) SetIsolationLevel(level IsolationLevel) error
func (*Connection) SetReadOnlyMode ¶
func (c *Connection) SetReadOnlyMode(readOnly ReadOnlyMode) error
func (*Connection) Statement ¶
func (c *Connection) Statement() (*Statement, error)
type CursorSensitivity ¶ added in v0.9.0
type CursorSensitivity uint64
type Environment ¶
type Environment struct {
// contains filtered or unexported fields
}
func NewEnvironment ¶
func NewEnvironment(config *Config) (*Environment, error)
func (*Environment) Close ¶
func (e *Environment) Close() error
func (*Environment) Connect ¶
func (e *Environment) Connect(ctx context.Context, connStr string) (*Connection, error)
func (*Environment) SetPoolOption ¶
func (e *Environment) SetPoolOption(option PoolOption) error
func (*Environment) SetTraceFile ¶
func (e *Environment) SetTraceFile(filePath string) error
SetTraceFile enables unixodbc trace output to the specified file, or disables tracing if the filePath is empty
func (*Environment) SetVersion ¶
func (e *Environment) SetVersion(version Version) error
type IsolationLevel ¶
type IsolationLevel uint64
type PoolOption ¶
type PoolOption uint64
type ReadOnlyMode ¶
type ReadOnlyMode uint64
type RecordSet ¶
type RecordSet struct {
// contains filtered or unexported fields
}
func (*RecordSet) ColumnNames ¶
func (*RecordSet) ColumnWithName ¶
type Statement ¶
type Statement struct {
// contains filtered or unexported fields
}
func (*Statement) BindParams ¶
func (*Statement) ExecDirect ¶
func (*Statement) ResetParams ¶
func (*Statement) SetConcurrency ¶ added in v0.9.0
func (s *Statement) SetConcurrency(concurrency Concurrency) error
func (*Statement) SetCursorSensitivity ¶ added in v0.9.0
func (s *Statement) SetCursorSensitivity(sensitivity CursorSensitivity) error
Click to show internal directories.
Click to hide internal directories.