local

package
v0.0.0-...-abdc0c1 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

func NewStore

func NewStore(basePath string) *Store

func (*Store) Close

func (c *Store) Close() error

Close closes all underlying database connections.

func (*Store) DB

func (c *Store) DB(namespace string) (*sql.DB, error)

DB returns the *sql.DB for the given namespace, creating it if needed. Pass an empty string for the default namespace.

func (*Store) Delete

func (c *Store) Delete(ctx context.Context, key *datastore.Key) error

func (*Store) DeleteMulti

func (c *Store) DeleteMulti(ctx context.Context, keys []*datastore.Key) error

func (*Store) Get

func (c *Store) Get(ctx context.Context, key *datastore.Key, dst interface{}) error

func (*Store) GetMulti

func (c *Store) GetMulti(ctx context.Context, keys []*datastore.Key, dst interface{}) error

func (*Store) NewTransaction

func (c *Store) NewTransaction(ctx context.Context, opts ...datastore.TransactionOption) (ds.TransactionStore, error)

func (*Store) Put

func (c *Store) Put(ctx context.Context, key *datastore.Key, src interface{}) (*datastore.Key, error)

func (*Store) PutMulti

func (c *Store) PutMulti(ctx context.Context, keys []*datastore.Key, src interface{}) ([]*datastore.Key, error)

func (*Store) Run

func (c *Store) Run(ctx context.Context, q ds.Query) ds.Iterator

func (*Store) RunInTransaction

func (c *Store) RunInTransaction(ctx context.Context, f func(tx ds.TransactionStore) error, opts ...datastore.TransactionOption) (*datastore.Commit, error)

Jump to

Keyboard shortcuts

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