Documentation
¶
Overview ¶
Package sqlite provides SQLite3-backed implementations of all LinkSelf storage interfaces. It uses a single WAL-mode database file and manages schema migrations via PRAGMA user_version.
Index ¶
- type DB
- func (db *DB) Close() error
- func (db *DB) DeviceStorage() devicesync.DeviceStorage
- func (db *DB) GroupStore() group.Store
- func (db *DB) NetworkStore() network.Store
- func (db *DB) RecordStorage() syncdb.RecordStorage
- func (db *DB) SharedStorage() groupshare.SharedStorage
- func (db *DB) SubscriptionStore() groupshare.SubscriptionStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB wraps a single SQLite3 connection and exposes typed storage accessors.
func Open ¶
Open opens (or creates) a SQLite3 database at path, enables WAL mode, and runs any pending schema migrations. Use ":memory:" for testing.
func (*DB) DeviceStorage ¶
func (db *DB) DeviceStorage() devicesync.DeviceStorage
DeviceStorage returns a devicesync.DeviceStorage backed by this DB.
func (*DB) GroupStore ¶
GroupStore returns a group.Store backed by this DB.
func (*DB) NetworkStore ¶
NetworkStore returns a network.Store backed by this DB.
func (*DB) RecordStorage ¶
func (db *DB) RecordStorage() syncdb.RecordStorage
RecordStorage returns a syncdb.RecordStorage backed by this DB.
func (*DB) SharedStorage ¶
func (db *DB) SharedStorage() groupshare.SharedStorage
SharedStorage returns a groupshare.SharedStorage backed by this DB.
func (*DB) SubscriptionStore ¶
func (db *DB) SubscriptionStore() groupshare.SubscriptionStore
SubscriptionStore returns a groupshare.SubscriptionStore backed by this DB.