MCPcopy
hub / github.com/simstudioai/sim / scaledStatementTimeoutMs

Function scaledStatementTimeoutMs

apps/sim/lib/table/tx.ts:44–50  ·  view source on GitHub ↗
(
  rowCount: number,
  opts: { baseMs: number; perRowMs: number }
)

Source from the content-addressed store, hash-verified

42 * runaway transaction cannot indefinitely pin a pool connection.
43 */
44export function scaledStatementTimeoutMs(
45 rowCount: number,
46 opts: { baseMs: number; perRowMs: number }
47): number {
48 const safeRowCount = Math.max(0, rowCount)
49 return Math.min(TIMEOUT_CAP_MS, Math.max(opts.baseMs, safeRowCount * opts.perRowMs))
50}

Callers 4

replaceTableRowsWithTxFunction · 0.90
updateColumnTypeFunction · 0.90
updateColumnConstraintsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected