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

Function isSafeToPushIntoExistingSubquery

packages/db/src/query/optimizer.ts:1045–1057  ·  view source on GitHub ↗
(
  query: QueryIR,
  whereClause: BasicExpression<boolean>,
  outerAlias: string,
)

Source from the content-addressed store, hash-verified

1043}
1044
1045function isSafeToPushIntoExistingSubquery(
1046 query: QueryIR,
1047 whereClause: BasicExpression<boolean>,
1048 outerAlias: string,
1049): boolean {
1050 return !(
1051 unsafeSelect(query, whereClause, outerAlias) ||
1052 unsafeGroupBy(query) ||
1053 unsafeHaving(query) ||
1054 unsafeOrderBy(query) ||
1055 unsafeFnSelect(query)
1056 )
1057}
1058
1059/**
1060 * Detects whether a SELECT projection contains any aggregate expressions.

Callers 1

optimizeFromWithTrackingFunction · 0.85

Calls 5

unsafeSelectFunction · 0.85
unsafeGroupByFunction · 0.85
unsafeHavingFunction · 0.85
unsafeOrderByFunction · 0.85
unsafeFnSelectFunction · 0.85

Tested by

no test coverage detected