MCPcopy Create free account
hub / github.com/Effect-TS/effect / rowCap

Function rowCap

packages/effect/src/eventlog/SqlEventLogServerEncrypted.ts:598–601  ·  view source on GitHub ↗
(rows: number)

Source from the content-addressed store, hash-verified

596
597 // The clauses that cap a statement at `rows` rows, for `SELECT ${top} ... ${limit}`.
598 const rowCap = (rows: number) => ({
599 top: sql.onDialectOrElse({ mssql: () => sql.literal(`TOP (${rows})`), orElse: () => noClause }),
600 limit: sql.onDialectOrElse({ mssql: () => noClause, orElse: () => sql.literal(`LIMIT ${rows}`) })
601 })
602 const { limit, top } = rowCap(pageSize)
603 const { limit: chunkLimit, top: chunkTop } = rowCap(pruneChunkRows)
604 // Streams rows in key order, one page per statement.

Callers 1

makeStorageFunction · 0.85

Calls 1

literalMethod · 0.80

Tested by

no test coverage detected