Documentation
¶
Overview ¶
Package sqlitestore implements the blob.KV interface using SQLite3.
Index ¶
- func Opener(_ context.Context, addr string) (blob.StoreCloser, error)
- type KV
- func (s KV) Delete(ctx context.Context, key string) error
- func (s KV) Get(ctx context.Context, key string) ([]byte, error)
- func (s KV) Has(ctx context.Context, keys ...string) (blob.KeySet, error)
- func (s KV) Len(ctx context.Context) (int64, error)
- func (s KV) List(ctx context.Context, start string) iter.Seq2[string, error]
- func (s KV) Put(ctx context.Context, opts blob.PutOptions) error
- type Options
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Opener ¶
Opener constructs a sqlitestore from a SQLite URI, for use with the store package. To specify the table name, prefix addr with "tablename@".
If poolsize=n is set, it is used to set the pool size. If compress=v is set, it is used to enable/disable compression (default true). Other query parameters are passed to SQLite.
Types ¶
type KV ¶
type KV struct {
// contains filtered or unexported fields
}
A KV implements the blob.KV interface using a SQLite3 database.
type Options ¶
type Options struct { // The name of the SQL driver to use, default "sqlite". Driver string // The number of connections to allow in the pool. If <= 0, use runtime.NumCPU. PoolSize int // If true, store blobs without compression; by default blob data are // compressed with Snappy. Uncompressed bool }
Options are options for constructing a KV. A nil *Options is ready for use and provides default values as described.
Click to show internal directories.
Click to hide internal directories.