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

Function isDefaultOrderRowsQuery

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

* A cached rows query whose ordering matches reconcileCreatedRow's * orderKey/position heuristic: the default view with no active filter or sort. * Filtered or column-sorted variants encode a non-null `filter`/`sort` in their * params key — their membership, order, and `totalCount` are qu

(queryKey: readonly unknown[])

Source from the content-addressed store, hash-verified

724 * `find`/`write` subtrees aren't row-list data and never match.
725 */
726function isDefaultOrderRowsQuery(queryKey: readonly unknown[]): boolean {
727 if (queryKey.includes('find') || queryKey.includes('write')) return false
728 const last = queryKey[queryKey.length - 1]
729 if (typeof last !== 'string') return false
730 try {
731 const params = JSON.parse(last) as { filter?: unknown; sort?: unknown }
732 return params.filter == null && params.sort == null
733 } catch {
734 return false
735 }
736}
737
738/**
739 * Splice a server-returned new row into the paginated row cache. Bumps the

Callers 2

useCreateTableRowFunction · 0.85
reconcileCreatedRowFunction · 0.85

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected