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

Function readTableRowCount

apps/sim/hooks/queries/tables.ts:336–342  ·  view source on GitHub ↗

The table's maintained, unfiltered `rowCount` from the detail cache (or * `null` when the detail hasn't loaded). This is the right scope for a Run-all * estimate: the dispatcher runs every row regardless of the active view * filter, whereas the rows query's `totalCount` is filter-scoped.

(
  queryClient: ReturnType<typeof useQueryClient>,
  tableId: string
)

Source from the content-addressed store, hash-verified

334 * estimate: the dispatcher runs every row regardless of the active view
335 * filter, whereas the rows query's `totalCount` is filter-scoped. */
336function readTableRowCount(
337 queryClient: ReturnType<typeof useQueryClient>,
338 tableId: string
339): number | null {
340 const def = queryClient.getQueryData<TableDefinition>(tableKeys.detail(tableId))
341 return typeof def?.rowCount === 'number' ? def.rowCount : null
342}
343
344/** Optimistically reflect a run on the "X running" badge + per-row gutter Stop
345 * instantly (the optimistic stamp eats the dispatcher's `pending` SSE, so

Callers 1

useRunColumnFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected