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

Function timeCursorOrderBy

apps/sim/lib/data-drains/sources/cursor.ts:54–56  ·  view source on GitHub ↗
(timestampCol: PgColumn, idCol: PgColumn)

Source from the content-addressed store, hash-verified

52 * millisecond bucketing so cursor advancement never skips rows.
53 */
54export function timeCursorOrderBy(timestampCol: PgColumn, idCol: PgColumn): [SQL, SQL] {
55 return [sql`date_trunc('milliseconds', ${timestampCol}) asc`, sql`${idCol} asc`]
56}
57
58/**
59 * Excludes rows newer than a short stability window. Timestamp cursors assume

Callers 5

pagesFunction · 0.90
pagesFunction · 0.90
pagesFunction · 0.90
pagesFunction · 0.90
pagesFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected