MCPcopy Create free account
hub / github.com/effect-app/libs / withDb

Function withDb

packages/infra/test/sql-store.test.ts:719–727  ·  view source on GitHub ↗
(fn: (db: Sqlite.Database) => void)

Source from the content-addressed store, hash-verified

717
718describe("SQL Store (SQLite integration)", () => {
719 const withDb = (fn: (db: Sqlite.Database) => void) => {
720 const db = new BetterSqlite(":memory:")
721 db.pragma("journal_mode = WAL")
722 try {
723 fn(db)
724 } finally {
725 db.close()
726 }
727 }
728
729 it("creates table and seeds data", () =>
730 withDb((db) => {

Callers 1

sql-store.test.tsFile · 0.85

Calls 2

closeMethod · 0.80
fnFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…