sqlite

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Persistence cdriver.PersistenceType = "sqlite"
)

Variables

This section is empty.

Functions

func NewNamedDriver

func NewNamedDriver(config driver.Config, dbProvider sqlite.DbProvider) fdbdriver.NamedDriver

func NewPersistenceWithOpts

func NewPersistenceWithOpts[V drivercommon.DBObject](cfg *sqlite.ConfigProvider, dbProvider sqlite.DbProvider, name driver.PersistenceName, constructor fsqlcommon.PersistenceConstructor[V], params ...string) (V, error)

NewPersistenceWithOpts constructs a V backed by the sqlite persistence configured under name and params: it resolves the connection options and table names, opens the database, and invokes constructor to build the store, creating its schema unless configured to skip.

Types

type Driver

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

func NewDriverWithDbProvider

func NewDriverWithDbProvider(config driver.Config, dbProvider sqlite.DbProvider) *Driver

func (*Driver) NewEndorseTx

func (d *Driver) NewEndorseTx(name driver.PersistenceName, params ...string) (fdbdriver.EndorseTxStore, error)

func (*Driver) NewEnvelope

func (d *Driver) NewEnvelope(name driver.PersistenceName, params ...string) (fdbdriver.EnvelopeStore, error)

func (*Driver) NewMetadata

func (d *Driver) NewMetadata(name driver.PersistenceName, params ...string) (fdbdriver.MetadataStore, error)

func (*Driver) NewVault

func (d *Driver) NewVault(name driver.PersistenceName, params ...string) (cdriver.VaultStore, error)

type EndorseTxStore

type EndorseTxStore struct {
	*common.EndorseTxStore
}

func NewEndorseTxStore

func NewEndorseTxStore(dbs *drivercommon.RWDB, tables common.TableNames) (*EndorseTxStore, error)

type EnvelopeStore

type EnvelopeStore struct {
	*common.EnvelopeStore
}

func NewEnvelopeStore

func NewEnvelopeStore(dbs *drivercommon.RWDB, tables common.TableNames) (*EnvelopeStore, error)

type MetadataStore

type MetadataStore struct {
	*common.MetadataStore
}

func NewMetadataStore

func NewMetadataStore(dbs *drivercommon.RWDB, tables common.TableNames) (*MetadataStore, error)

type VaultStore

type VaultStore struct {
	*common.VaultStore
	// contains filtered or unexported fields
}

func NewVaultStore

func NewVaultStore(dbs *drivercommon.RWDB, tables common.TableNames) (*VaultStore, error)

func (*VaultStore) CreateSchema

func (db *VaultStore) CreateSchema() error

CreateSchema creates the status and state tables if they do not exist. The state table's primary key is (ns, pkey). A table whose primary key is (pkey, ns) is rebuilt in one transaction, copying every row. The key order is read once before that transaction, so an upgraded table is left alone, and again after a write lock, so replicas sharing the file rebuild it once.

func (*VaultStore) Store

func (db *VaultStore) Store(ctx context.Context, txIDs []driver.TxID, writes driver.Writes, metaWrites driver.MetaWrites) error

Jump to

Keyboard shortcuts

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