Documentation ¶
Index ¶
- Variables
- func GetUri(o *client.Options) string
- func Open(dns string) *sql.DB
- func OpenDB(cliOpts *client.Options) *sql.DB
- func ParseConfig(uri string) (*client.Options, error)
- func RegisterConnConfig(clientOptions *client.Options) string
- func RenderValue(op interface{}) interface{}
- func UnregisterConnConfig(connStr string)
- type Conn
- func (c *Conn) Begin() (driver.Tx, error)
- func (c *Conn) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, error)
- func (c *Conn) CheckNamedValue(nv *driver.NamedValue) error
- func (c *Conn) Close() error
- func (c *Conn) ExecContext(ctx context.Context, query string, argsV []driver.NamedValue) (driver.Result, error)
- func (c *Conn) GetImmuClient() client.ImmuClient
- func (c *Conn) Prepare(query string) (driver.Stmt, error)
- func (c *Conn) PrepareContext(ctx context.Context, query string) (driver.Stmt, error)
- func (c *Conn) QueryContext(ctx context.Context, query string, argsV []driver.NamedValue) (driver.Rows, error)
- func (c *Conn) ResetSession(ctx context.Context) error
- type Driver
- type Rows
- func (r *Rows) Close() error
- func (r *Rows) ColumnTypeDatabaseTypeName(index int) string
- func (r *Rows) ColumnTypeLength(index int) (int64, 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 RowsAffected
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBadQueryString = errors.New("bad query string. use format immudb://username:secret@host:port/db")
View Source
var ErrFloatValuesNotSupported = errors.New("float values are not yet supported by immudb")
View Source
var ErrNotImplemented = errors.New("not implemented")
View Source
var ErrTimeValuesNotSupported = errors.New("time values are not yet supported by immudb")
Functions ¶
func RegisterConnConfig ¶ added in v1.2.2
RegisterConnConfig registers a ConnConfig and returns the connection string to use with Open.
func RenderValue ¶
func RenderValue(op interface{}) interface{}
func UnregisterConnConfig ¶ added in v1.2.2
func UnregisterConnConfig(connStr string)
UnregisterConnConfig removes the ConnConfig registration for connStr.
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func (*Conn) CheckNamedValue ¶
func (c *Conn) CheckNamedValue(nv *driver.NamedValue) error
func (*Conn) ExecContext ¶
func (*Conn) GetImmuClient ¶
func (c *Conn) GetImmuClient() client.ImmuClient
Conn returns the underlying client.ImmuClient
func (*Conn) PrepareContext ¶
func (*Conn) QueryContext ¶
type Rows ¶
type Rows struct {
// contains filtered or unexported fields
}
func (*Rows) ColumnTypeDatabaseTypeName ¶
ColumnTypeDatabaseTypeName
IntegerType SQLValueType = "INTEGER" BooleanType SQLValueType = "BOOLEAN" VarcharType SQLValueType = "VARCHAR" BLOBType SQLValueType = "BLOB" TimestampType SQLValueType = "TIMESTAMP" AnyType SQLValueType = "ANY"
func (*Rows) ColumnTypeLength ¶
ColumnTypeLength If length is not limited other than system limits, it should return math.MaxInt64
func (*Rows) ColumnTypePrecisionScale ¶
ColumnTypePrecisionScale should return the precision and scale for decimal types. If not applicable, variableLength should be false.
func (*Rows) ColumnTypeScanType ¶
ColumnTypeScanType returns the value type that can be used to scan types into.
type RowsAffected ¶ added in v1.2.0
type RowsAffected struct {
// contains filtered or unexported fields
}
RowsAffected implements Result for an INSERT or UPDATE operation which mutates a number of rows.
func (RowsAffected) LastInsertId ¶ added in v1.2.0
func (rows RowsAffected) LastInsertId() (int64, error)
func (RowsAffected) RowsAffected ¶ added in v1.2.0
func (rows RowsAffected) RowsAffected() (int64, error)
Click to show internal directories.
Click to hide internal directories.