MCPcopy Index your code
hub / github.com/TanStack/db / parseLoadSubsetOptions

Function parseLoadSubsetOptions

packages/db/src/query/expression-helpers.ts:499–522  ·  view source on GitHub ↗
(
  options:
    | {
        where?: BasicExpression<boolean>
        orderBy?: OrderBy
        limit?: number
      }
    | undefined
    | null,
)

Source from the content-addressed store, hash-verified

497 * ```
498 */
499export function parseLoadSubsetOptions(
500 options:
501 | {
502 where?: BasicExpression<boolean>
503 orderBy?: OrderBy
504 limit?: number
505 }
506 | undefined
507 | null,
508): {
509 filters: Array<SimpleComparison>
510 sorts: Array<ParsedOrderBy>
511 limit?: number
512} {
513 if (!options) {
514 return { filters: [], sorts: [] }
515 }
516
517 return {
518 filters: extractSimpleComparisons(options.where),
519 sorts: parseOrderByExpression(options.orderBy),
520 limit: options.limit,
521 }
522}

Callers 3

query.test-d.tsFile · 0.90
applyPredicatesFunction · 0.90

Calls 2

extractSimpleComparisonsFunction · 0.85
parseOrderByExpressionFunction · 0.85

Tested by

no test coverage detected