stdlib

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2021 License: Apache-2.0 Imports: 16 Imported by: 8

Documentation

Index

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")

Functions

func GetUri

func GetUri(o *client.Options) string

func OpenDB

func OpenDB(cliOpts *client.Options) *sql.DB

func ParseConfig

func ParseConfig(uri string) (*client.Options, error)

func RenderValue

func RenderValue(op interface{}) interface{}

Types

type Conn

type Conn struct {
	Token string
	// contains filtered or unexported fields
}

func (*Conn) Begin

func (c *Conn) Begin() (driver.Tx, error)

func (*Conn) BeginTx

func (c *Conn) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, error)

func (*Conn) CheckNamedValue

func (c *Conn) CheckNamedValue(nv *driver.NamedValue) error

func (*Conn) Close

func (c *Conn) Close() error

func (*Conn) ExecContext

func (c *Conn) ExecContext(ctx context.Context, query string, argsV []driver.NamedValue) (driver.Result, error)

func (*Conn) GetDriver

func (c *Conn) GetDriver() *Driver

func (*Conn) GetImmuClient

func (c *Conn) GetImmuClient() client.ImmuClient

Conn returns the underlying client.ImmuClient

func (*Conn) GetToken

func (c *Conn) GetToken() string

func (*Conn) Prepare

func (c *Conn) Prepare(query string) (driver.Stmt, error)

func (*Conn) PrepareContext

func (c *Conn) PrepareContext(ctx context.Context, query string) (driver.Stmt, error)

func (*Conn) QueryContext

func (c *Conn) QueryContext(ctx context.Context, query string, argsV []driver.NamedValue) (driver.Rows, error)

func (*Conn) ResetSession

func (c *Conn) ResetSession(ctx context.Context) error

type ConnConfig

type ConnConfig struct {
	client.Options
}

type Connector

type Connector struct {
	// contains filtered or unexported fields
}

func (Connector) Connect

func (c Connector) Connect(ctx context.Context) (driver.Conn, error)

Connect implement driver.Connector interface

func (*Connector) Driver

func (dc *Connector) Driver() driver.Driver

type DBOption

type DBOption func(*Connector)

type Driver

type Driver struct {
	// contains filtered or unexported fields
}

func (*Driver) Open

func (d *Driver) Open(name string) (driver.Conn, error)

func (*Driver) OpenConnector

func (d *Driver) OpenConnector(name string) (driver.Connector, error)

type Rows

type Rows struct {
	// contains filtered or unexported fields
}

func (*Rows) Close

func (r *Rows) Close() error

func (*Rows) ColumnTypeDatabaseTypeName

func (r *Rows) ColumnTypeDatabaseTypeName(index int) string

ColumnTypeDatabaseTypeName

func (*Rows) ColumnTypeLength

func (r *Rows) ColumnTypeLength(index int) (int64, bool)

ColumnTypeLength If length is not limited other than system limits, it should return math.MaxInt64

func (*Rows) ColumnTypePrecisionScale

func (r *Rows) ColumnTypePrecisionScale(index int) (precision, scale int64, ok bool)

ColumnTypePrecisionScale should return the precision and scale for decimal types. If not applicable, ok should be false.

func (*Rows) ColumnTypeScanType

func (r *Rows) ColumnTypeScanType(index int) reflect.Type

ColumnTypeScanType returns the value type that can be used to scan types into.

func (*Rows) Columns

func (r *Rows) Columns() []string

func (*Rows) Next

func (r *Rows) Next(dest []driver.Value) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL