sqlite

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const InMemory = ":memory:"

Variables

This section is empty.

Functions

This section is empty.

Types

type Option added in v1.17.0

type Option func(*storeConfig)

func WithMultiProcessAccess added in v1.17.0

func WithMultiProcessAccess() Option

WithMultiProcessAccess enables WAL mode and busy timeout so multiple OS processes can safely share the same SQLite database file.

type Store

type Store struct {
	storage.DefaultStore
	// contains filtered or unexported fields
}

Store implements the Store interface

func New

func New(url string, opts ...Option) (store *Store, err error)

New returns a new in-memory Store implementation.

func (*Store) Close

func (s *Store) Close() error

func (*Store) CreateSnapshot added in v0.46.0

func (s *Store) CreateSnapshot(name string) error

func (*Store) DB added in v1.0.0

func (s *Store) DB() *sql.DB

func (*Store) GetBytes

func (s *Store) GetBytes(ctx context.Context, store string, key []byte) ([]byte, error)

func (*Store) GetBytesAtVersion

func (s *Store) GetBytesAtVersion(_ context.Context, store string, key []byte, version uint64) ([]byte, error)

func (*Store) LoadSnapshot added in v0.46.0

func (s *Store) LoadSnapshot(name string) error

func (*Store) RollbackToBlockHeight added in v0.46.0

func (s *Store) RollbackToBlockHeight(height uint64) error

func (*Store) SetBytes

func (s *Store) SetBytes(ctx context.Context, store string, key []byte, value []byte) error

func (*Store) SetBytesWithVersion

func (s *Store) SetBytesWithVersion(_ context.Context, store string, key []byte, value []byte, version uint64) error

func (*Store) SetBytesWithVersionAndHeight added in v1.0.0

func (s *Store) SetBytesWithVersionAndHeight(_ context.Context, store string, key []byte, value []byte, version, height uint64) error

func (*Store) Snapshots

func (s *Store) Snapshots() (snapshots []string, err error)

func (*Store) SupportSnapshotsWithCurrentConfig

func (s *Store) SupportSnapshotsWithCurrentConfig() bool

Jump to

Keyboard shortcuts

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