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

Function buildPageQuery

apps/sim/lib/table/rows/service.ts:1002–1009  ·  view source on GitHub ↗
(executor: DbExecutor)

Source from the content-addressed store, hash-verified

1000 : whereClause
1001
1002 const buildPageQuery = (executor: DbExecutor) => {
1003 const query = executor
1004 .select()
1005 .from(userTableRows)
1006 .where(pageWhere ?? baseConditions)
1007 .orderBy(buildRowOrderBySql(sort, tableName, columns, fractionalOrdering))
1008 return after ? query.limit(limit) : query.limit(limit).offset(offset)
1009 }
1010
1011 // Count and page fetch are independent reads — run them concurrently so the
1012 // `includeTotal` hot path doesn't pay two serial round-trips. Filtered counts

Callers 1

queryRowsFunction · 0.85

Calls 1

buildRowOrderBySqlFunction · 0.85

Tested by

no test coverage detected