sqlite

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts Opts, queryTimeout time.Duration, logger *zap.Logger) (persistence.Persister, error)

func NewSQLClient

func NewSQLClient(opts Opts, logger *zap.Logger) (*sql.DB, error)

Types

type Opts

type Opts struct {
	Filename string
	InMemory bool
	SQLOpen  func(driver persistence.Driver, dataSourceName string) (*sql.DB, error)
}

type SQLite

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

func (*SQLite) Close

func (s *SQLite) Close() error

func (*SQLite) Delete

func (s *SQLite) Delete(ctx context.Context, key string) error

func (*SQLite) Get

func (s *SQLite) Get(ctx context.Context, key string) ([]byte, error)

func (*SQLite) List

func (s *SQLite) List(ctx context.Context, prefix string, opts *persistence.ListOpts) (persistence.ListResult, error)

func (*SQLite) Put

func (s *SQLite) Put(ctx context.Context, key string, value []byte) error

func (*SQLite) Tx

func (s *SQLite) Tx(ctx context.Context) (persistence.Tx, error)

Jump to

Keyboard shortcuts

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