MCPcopy Index your code
hub / github.com/simstudioai/sim / readRowsVersion

Function readRowsVersion

apps/sim/lib/table/snapshot-cache.ts:77–85  ·  view source on GitHub ↗
(tableId: string)

Source from the content-addressed store, hash-verified

75}
76
77async function readRowsVersion(tableId: string): Promise<number> {
78 const [row] = await db
79 .select({ rowsVersion: userTableDefinitions.rowsVersion })
80 .from(userTableDefinitions)
81 .where(eq(userTableDefinitions.id, tableId))
82 .limit(1)
83 if (!row) throw new Error(`Table ${tableId} not found while reading rows_version`)
84 return row.rowsVersion
85}
86
87/**
88 * Streams the table CSV (keyset-paginated, like the export worker) into storage under `key`,

Callers 1

getOrCreateTableSnapshotFunction · 0.85

Calls 1

eqFunction · 0.50

Tested by

no test coverage detected