driver

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDBIsClosed    = errors.New("db is closed")
	ErrDBIsNotOpened = errors.New("db is not opened")
)

Functions

func StmtExecNoResults

func StmtExecNoResults(stmt *sqlite.Stmt) (err error)

Types

type Conn

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

func (*Conn) Begin

func (c *Conn) Begin(ctx context.Context) (err error)

func (*Conn) Close

func (c *Conn) Close() (err error)

func (*Conn) Commit

func (c *Conn) Commit(ctx context.Context) (err error)

func (*Conn) Exec

func (c *Conn) Exec(ctx context.Context, query string, bind func(stmt *sqlite.Stmt), result func(stmt *sqlite.Stmt) error) (err error)

func (*Conn) ExecCached

func (c *Conn) ExecCached(ctx context.Context, query string, bind func(stmt *sqlite.Stmt), result func(stmt *sqlite.Stmt) error) (err error)

func (*Conn) ExecNoResult

func (c *Conn) ExecNoResult(ctx context.Context, query string) (err error)

func (*Conn) Prepare

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

func (*Conn) Query

func (c *Conn) Query(ctx context.Context, query string) (*sqlite.Stmt, error)

func (*Conn) Rollback

func (c *Conn) Rollback(ctx context.Context) (err error)

type ConnManager

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

func NewConnManager

func NewConnManager(path string, pragma map[string]string, writeCount, readCount int, fr *registry.FilterRegistry, sr *registry.SortRegistry) (*ConnManager, error)

func (*ConnManager) Close

func (c *ConnManager) Close() (err error)

func (*ConnManager) GetRead

func (c *ConnManager) GetRead(ctx context.Context) (conn *Conn, err error)

func (*ConnManager) GetWrite

func (c *ConnManager) GetWrite(ctx context.Context) (conn *Conn, err error)

func (*ConnManager) ReleaseRead

func (c *ConnManager) ReleaseRead(conn *Conn)

func (*ConnManager) ReleaseWrite

func (c *ConnManager) ReleaseWrite(conn *Conn)

type Stmt

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

func (Stmt) Close

func (s Stmt) Close() error

func (Stmt) Exec

func (s Stmt) Exec(ctx context.Context, bind func(stmt *sqlite.Stmt), result func(stmt *sqlite.Stmt) error) (err error)

Jump to

Keyboard shortcuts

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