sqlite

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2025 License: Apache-2.0 Imports: 26 Imported by: 1

Documentation

Index

Constants

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

Variables

View Source
var IsolationLevels = isolationLevelMapper{
	driver.LevelDefault:      sql.LevelDefault,
	driver.LevelSerializable: sql.LevelSerializable,
}

Functions

func NewConditionInterpreter

func NewConditionInterpreter() common2.CondInterpreter

func NewKeyValueStoreNotifier

func NewKeyValueStoreNotifier(dbs *common3.RWDB, table string) (*notifier.UnversionedPersistenceNotifier, error)

func NewNamedDriver

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

func NewPaginationInterpreter

func NewPaginationInterpreter() common.PagInterpreter

func NewPersistenceWithOpts

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

func NewRetryWriteDB

func NewRetryWriteDB(db *sql.DB) *retryWriteDB

func NewSanitizer

func NewSanitizer() *stringSanitizer

Types

type AuditInfoStore

type AuditInfoStore struct {
	*common2.AuditInfoStore
}

func NewAuditInfoStore

func NewAuditInfoStore(dbs *common3.RWDB, tables common2.TableNames) (*AuditInfoStore, error)

type BindingStore

type BindingStore struct {
	*common2.BindingStore
	// contains filtered or unexported fields
}

func NewBindingStore

func NewBindingStore(dbs *common3.RWDB, tables common2.TableNames) (*BindingStore, error)

func (*BindingStore) PutBinding

func (db *BindingStore) PutBinding(ctx context.Context, ephemeral, longTerm view.Identity) error

type Config

type Config struct {
	TablePrefix     string
	DataSource      string
	SkipPragmas     bool
	MaxOpenConns    int
	MaxIdleConns    *int
	MaxIdleTime     *time.Duration
	SkipCreateTable bool
	TableNameParams []string
	Tracing         *common2.TracingConfig
}

type ConfigProvider

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

func NewConfigProvider

func NewConfigProvider(config config) *ConfigProvider

func (*ConfigProvider) GetOpts

func (r *ConfigProvider) GetOpts(name driver.PersistenceName, params ...string) (*Config, error)

type DbProvider

type DbProvider interface {
	Get(Opts) (*common.RWDB, error)
}

func NewDbProvider

func NewDbProvider() DbProvider

type Driver

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

func NewDriver

func NewDriver(config driver.Config) *Driver

func NewDriverWithDbProvider

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

func (*Driver) NewAuditInfo

func (d *Driver) NewAuditInfo(name driver.PersistenceName, params ...string) (driver.AuditInfoStore, error)

func (*Driver) NewBinding

func (d *Driver) NewBinding(name driver.PersistenceName, params ...string) (driver.BindingStore, error)

func (*Driver) NewKVS

func (d *Driver) NewKVS(name driver.PersistenceName, params ...string) (driver.KeyValueStore, error)

func (*Driver) NewSignerInfo

func (d *Driver) NewSignerInfo(name driver.PersistenceName, params ...string) (driver.SignerInfoStore, error)

type ErrorMapper

type ErrorMapper struct{}

func (*ErrorMapper) WrapError

func (m *ErrorMapper) WrapError(err error) error

type KeyValueStore

type KeyValueStore struct {
	*common2.KeyValueStore
}

func NewKeyValueStore

func NewKeyValueStore(dbs *common3.RWDB, tables common2.TableNames) (*KeyValueStore, error)

type Opts

type Opts struct {
	DataSource      string
	SkipPragmas     bool
	MaxOpenConns    int
	MaxIdleConns    int
	MaxIdleTime     time.Duration
	TablePrefix     string
	TableNameParams []string
	Tracing         *common2.TracingConfig
}

type SignerInfoStore

type SignerInfoStore struct {
	*common2.SignerInfoStore
}

func NewSignerInfoStore

func NewSignerInfoStore(dbs *common3.RWDB, tables common2.TableNames) (*SignerInfoStore, error)

Jump to

Keyboard shortcuts

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