Documentation ¶
Index ¶
- Variables
- func FormatError(ht C.SQLSMALLINT, h C.SQLHANDLE) error
- func StringToUTF16(s string) []uint16
- func StringToUTF16Ptr(s string) *uint16
- func Success(ret C.SQLRETURN) bool
- func UTF16ToString(s []uint16) string
- type Connection
- func (conn *Connection) AutoCommit(b bool) error
- func (conn *Connection) BeginTransaction() error
- func (conn *Connection) ClientInfo() (driverName string, odbcVersion string, driverVersion string, err error)
- func (conn *Connection) Close() error
- func (conn *Connection) Commit() error
- func (conn *Connection) ExecDirect(sql string) (*Statement, error)
- func (conn *Connection) Prepare(sql string, params ...interface{}) (*Statement, error)
- func (conn *Connection) Rollback() error
- func (conn *Connection) ServerInfo() (dbName, dbVersion, serverName string, err error)
- type Error
- type Field
- type Row
- type Statement
- func (stmt *Statement) BindParam(index int, param interface{}) error
- func (stmt *Statement) Cancel() error
- func (stmt *Statement) Close()
- func (stmt *Statement) Execute(params ...interface{}) error
- func (stmt *Statement) Execute2(params []driver.Value) error
- func (stmt *Statement) Fetch() (bool, error)
- func (stmt *Statement) FetchAll() (rows []*Row, err error)
- func (stmt *Statement) FetchOne() (*Row, error)
- func (stmt *Statement) FetchOne2(row []driver.Value) (eof bool, err error)
- func (stmt *Statement) FieldMetadata(col int) (*Field, error)
- func (stmt *Statement) GetField(fieldIndex int) (v interface{}, ftype int, flen int, err error)
- func (stmt *Statement) GetParamType(index int) (int, int, int, int, error)
- func (stmt *Statement) HasRows() bool
- func (stmt *Statement) NextResult() bool
- func (stmt *Statement) NumFields() (int, error)
- func (stmt *Statement) NumParams() int
- func (stmt *Statement) NumRows() (int, error)
- func (stmt *Statement) RowsAffected() (int, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Genv C.SQLHANDLE
)
Functions ¶
func FormatError ¶
func FormatError(ht C.SQLSMALLINT, h C.SQLHANDLE) error
func StringToUTF16 ¶
StringToUTF16 returns the UTF-16 encoding of the UTF-8 string s, with a terminating NUL added.
func StringToUTF16Ptr ¶
StringToUTF16Ptr returns pointer to the UTF-16 encoding of the UTF-8 string s, with a terminating NUL added.
func UTF16ToString ¶
UTF16ToString returns the UTF-8 encoding of the UTF-16 sequence s, with a terminating NUL removed.
Types ¶
type Connection ¶
func Connect ¶
func Connect(dsn string, params ...interface{}) (*Connection, error)
func (*Connection) AutoCommit ¶
func (conn *Connection) AutoCommit(b bool) error
func (*Connection) BeginTransaction ¶
func (conn *Connection) BeginTransaction() error
func (*Connection) ClientInfo ¶
func (conn *Connection) ClientInfo() (driverName string, odbcVersion string, driverVersion string, err error)
ClientInfo fetch info regarding the client's driver.
func (*Connection) Close ¶
func (conn *Connection) Close() error
func (*Connection) Commit ¶
func (conn *Connection) Commit() error
func (*Connection) ExecDirect ¶
func (conn *Connection) ExecDirect(sql string) (*Statement, error)
func (*Connection) Prepare ¶
func (conn *Connection) Prepare(sql string, params ...interface{}) (*Statement, error)
func (*Connection) Rollback ¶
func (conn *Connection) Rollback() error
func (*Connection) ServerInfo ¶
func (conn *Connection) ServerInfo() (dbName, dbVersion, serverName string, err error)
ServerInfo fetch info regarding the underlying database server
type Row ¶
type Row struct {
Data []interface{}
}
type Statement ¶
type Statement struct {
// contains filtered or unexported fields
}
func (*Statement) GetParamType ¶
func (*Statement) NextResult ¶
func (*Statement) RowsAffected ¶
Click to show internal directories.
Click to hide internal directories.