MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / tableExists

Function tableExists

apps/local/src/db/v1-v2-migration.ts:140–143  ·  view source on GitHub ↗
(client: Client, table: string)

Source from the content-addressed store, hash-verified

138const quoteIdent = (value: string): string => `"${value.replaceAll('"', '""')}"`;
139
140const tableExists = async (client: Client, table: string): Promise<boolean> =>
141 (await queryFirst(client, "SELECT name FROM sqlite_master WHERE type = 'table' AND name = ?", [
142 table,
143 ])) != null;
144
145const columnNames = async (client: Client, table: string): Promise<ReadonlySet<string>> =>
146 new Set(

Callers 4

isLocalV1DatabaseFunction · 0.70
hasV1GateStampFunction · 0.70
replayLegacyV1MigrationsFunction · 0.70
readV1SnapshotFunction · 0.70

Calls 1

queryFirstFunction · 0.90

Tested by

no test coverage detected