Documentation ¶
Overview ¶
Package monetdb contains a database driver for MonetDB.
Use the following format for the Data Source Name (DSN) to make connection to the MonetDB server.
[username[:password]@]hostname[:port]/database
If the port is not specified, then the default port 50000 will be used.
Please check the project's GitHub page for more complete documentation - https://github.com/fajran/go-monetdb
Index ¶
- Constants
- type Conn
- func (c *Conn) Begin() (driver.Tx, error)deprecated
- func (c *Conn) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, error)
- func (c *Conn) CheckNamedValue(arg *driver.NamedValue) error
- func (c *Conn) Close() error
- func (c *Conn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error)
- func (c *Conn) Prepare(query string) (driver.Stmt, error)
- func (c *Conn) PrepareContext(ctx context.Context, query string) (Stmt, error)
- func (c *Conn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error)
- type Driver
- type Result
- type Rows
- 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) Next(dest []driver.Value) error
- type Stmt
- func (s *Stmt) CheckNamedValue(arg *driver.NamedValue) error
- func (s *Stmt) Close() error
- func (s *Stmt) Exec(args []driver.Value) (driver.Result, error)deprecated
- 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)deprecated
- func (s *Stmt) QueryContext(ctx context.Context, args []driver.NamedValue) (driver.Rows, error)
- type Tx
Constants ¶
const DriverVersion = "2.0.0"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func (*Conn) CheckNamedValue ¶
func (c *Conn) CheckNamedValue(arg *driver.NamedValue) error
func (*Conn) ExecContext ¶
func (*Conn) PrepareContext ¶
type Result ¶
type Result struct {
// contains filtered or unexported fields
}
func (Result) LastInsertId ¶
func (Result) RowsAffected ¶
type Rows ¶
type Rows struct {
// contains filtered or unexported fields
}
func (*Rows) ColumnTypeDatabaseTypeName ¶
See https://pkg.go.dev/database/sql/driver#RowsColumnTypeDatabaseTypeName for what to implement
func (*Rows) ColumnTypeLength ¶
See https://pkg.go.dev/database/sql/driver#RowsColumnTypeLength for what to implement This implies that we need to return the InternalSize value, not the DisplaySize
func (*Rows) ColumnTypeNullable ¶
For now it seems that the mapi protocol does not provide the required information
func (*Rows) ColumnTypePrecisionScale ¶
See https://pkg.go.dev/database/sql/driver#RowsColumnTypePrecisionScale for what to implement
func (*Rows) ColumnTypeScanType ¶
See https://pkg.go.dev/database/sql/driver#RowsColumnTypeScanType for what to implement
type Stmt ¶
type Stmt struct {
// contains filtered or unexported fields
}
func (*Stmt) CheckNamedValue ¶
func (s *Stmt) CheckNamedValue(arg *driver.NamedValue) error