driver

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDBIsClosed          = errors.New("any-store: db is closed")
	ErrDBIsNotOpened       = errors.New("any-store: db is not opened")
	ErrIncompatibleVersion = errors.New("any-store: incompatible version")
	ErrStmtIsClosed        = errors.New("any-store: stmt is closed")
)

Functions

func StmtExecNoResults

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

Types

type Conn

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

func (*Conn) Backup added in v0.1.4

func (c *Conn) Backup(ctx context.Context, path string) (err error)

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) IsClosed added in v0.0.5

func (c *Conn) IsClosed() bool

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,
	version int,
) (*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