driver

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(dsn string) (driver.Conn, error)

Types

type Connection

type Connection struct {
	File string
}

Connection is a single sqlite file It implements the driver.Conn and driver.Tx interfaces

func (*Connection) Begin

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

func (*Connection) Close

func (c *Connection) Close() error

func (*Connection) Prepare

func (c *Connection) Prepare(q string) (driver.Stmt, error)

type Driver

type Driver struct{}

Driver is the sqlittle database driver. It implements the driver.Driver interface

func (*Driver) Open

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

type Rows

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

Rows is the result set. It implements the driver.Rows interface.

func (*Rows) Close

func (r *Rows) Close() error

func (*Rows) Columns

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

func (*Rows) Next

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

type Statement

type Statement struct {
	SQL string
	// contains filtered or unexported fields
}

Statement is a single statement, belonging to a particular Connection. It implements the driver.Stmt, driver.StmtExecContext, and driver.StmtQueryContext interfaces.

func (*Statement) Close

func (st *Statement) Close() error

func (*Statement) Exec

func (st *Statement) Exec([]driver.Value) (driver.Result, error)

See ExecContext() instead

func (*Statement) ExecContext

func (st *Statement) ExecContext(context.Context, []driver.NamedValue) (driver.Result, error)

ExecContext is not relevant and always returns an error

func (Statement) NumInput

func (st Statement) NumInput() int

func (*Statement) Query

func (st *Statement) Query([]driver.Value) (driver.Rows, error)

See QueryContext() instead

func (*Statement) QueryContext

func (st *Statement) QueryContext(ctx context.Context, v []driver.NamedValue) (driver.Rows, error)

type Tx

type Tx struct{}

func (*Tx) Commit

func (*Tx) Commit() error

func (*Tx) Rollback

func (*Tx) Rollback() error

Jump to

Keyboard shortcuts

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