Documentation ¶
Overview ¶
Package sqlite provides a thin wrapper over the sqlc-generated SQLite wrapper to adhere to our server's DB interface.
Index ¶
- type DB
- func (d *DB) AddGraphEncryptKey(ctx context.Context, gID db.GraphID, gek *db.GraphEncryptKey) error
- func (d *DB) AddGraphSalt(ctx context.Context, gID db.GraphID, salt *db.GraphSalt) error
- func (d *DB) AllFileMeta(ctx context.Context, id db.GraphID) ([]*db.FileMeta, error)
- func (d *DB) BatchFileMeta(ctx context.Context, id db.GraphID, fIDs []db.FileID) (map[db.FileID]*db.FileMeta, error)
- func (d *DB) CreateGraph(ctx context.Context, name string) (db.GraphID, db.Tx, error)
- func (d *DB) DeleteGraph(ctx context.Context, id db.GraphID) error
- func (d *DB) Graph(ctx context.Context, id db.GraphID) (*db.Graph, error)
- func (d *DB) GraphEncryptKeys(ctx context.Context, id db.GraphID) ([]*db.GraphEncryptKey, error)
- func (d *DB) GraphSalts(ctx context.Context, id db.GraphID) ([]*db.GraphSalt, error)
- func (d *DB) Graphs(ctx context.Context) ([]*db.Graph, error)
- func (d *DB) IncrementTx(ctx context.Context, id db.GraphID) (db.Tx, error)
- func (d *DB) SetFileMeta(ctx context.Context, gID db.GraphID, md *db.FileMeta) error
- func (d *DB) SetTx(ctx context.Context, id db.GraphID, tx db.Tx) error
- func (d *DB) Tx(ctx context.Context, id db.GraphID) (db.Tx, error)
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
}
func (*DB) AddGraphEncryptKey ¶
func (*DB) AddGraphSalt ¶
func (*DB) AllFileMeta ¶
func (*DB) BatchFileMeta ¶
func (d *DB) BatchFileMeta(ctx context.Context, id db.GraphID, fIDs []db.FileID) (map[db.FileID]*db.FileMeta, error)
Because the Logseq client can/will request files it hasn't uploaded yet, the map will contain nil entries for requested files that don't exist
func (*DB) CreateGraph ¶
func (*DB) GraphEncryptKeys ¶
func (*DB) GraphSalts ¶
func (*DB) IncrementTx ¶
func (*DB) SetFileMeta ¶
Click to show internal directories.
Click to hide internal directories.