MCPcopy Create free account
hub / github.com/TanStack/db / createOrderByClause

Function createOrderByClause

packages/db/tests/cursor.test.ts:8–20  ·  view source on GitHub ↗
(
  path: string,
  direction: `asc` | `desc`,
)

Source from the content-addressed store, hash-verified

6
7// Helper to create an OrderByClause for testing
8function createOrderByClause(
9 path: string,
10 direction: `asc` | `desc`,
11): OrderByClause {
12 const compareOptions: CompareOptions = {
13 direction,
14 nulls: direction === `asc` ? `first` : `last`,
15 }
16 return {
17 expression: new PropRef([`t`, path]),
18 compareOptions,
19 }
20}
21
22// Helper to check if a Func has the expected structure
23function isFuncWithName(expr: unknown, name: string): expr is Func {

Callers 1

cursor.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected