MCPcopy Create free account
hub / github.com/tinyplex/tinybase / createPowerSync

Function createPowerSync

test/unit/persisters/powersync.test.ts:20–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18const dbFilenames: string[] = [];
19
20const createPowerSync = async (): Promise<PowerSyncDatabase> => {
21 const dbFilename = tmp.tmpNameSync();
22 const powerSync = new PowerSyncDatabase({
23 schema: new Schema({
24 pets: new Table({species: column.text}, {ignoreEmptyUpdates: true}),
25 }),
26 database: {
27 dbFilename,
28 implementation: {type: 'better-sqlite3'},
29 readWorkerCount: 1,
30 },
31 });
32 powerSyncs.push(powerSync);
33 dbFilenames.push(dbFilename);
34 await powerSync.init();
35 return powerSync;
36};
37
38const summarizeBatch = async (
39 powerSync: PowerSyncDatabase,

Callers 1

powersync.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…