MCPcopy Create free account
hub / github.com/bcspragu/logseq-sync / New

Function New

db/sqlite/sqlite.go:23–32  ·  view source on GitHub ↗
(dbPath string)

Source from the content-addressed store, hash-verified

21}
22
23func New(dbPath string) (*DB, error) {
24 db, err := sql.Open("sqlite3", dbPath)
25 if err != nil {
26 return nil, fmt.Errorf("failed to open SQLite database: %w", err)
27 }
28
29 return &DB{
30 q: sqlitedb.New(db),
31 }, nil
32}
33
34func (d *DB) IncrementTx(ctx context.Context, id db.GraphID) (db.Tx, error) {
35 res, err := d.q.IncrementTx(ctx, string(id))

Callers 1

runFunction · 0.92

Calls 1

NewFunction · 0.92

Tested by

no test coverage detected