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

Function toExpr

packages/db/src/query/builder/index.ts:954–965  ·  view source on GitHub ↗
(value: any)

Source from the content-addressed store, hash-verified

952
953// Helper to ensure we have a BasicExpression/Aggregate for a value
954function toExpr(value: any): BasicExpression | Aggregate {
955 if (value === undefined) return toExpression(null)
956 if (
957 value instanceof AggregateExpr ||
958 value instanceof FuncExpr ||
959 value instanceof PropRef ||
960 value instanceof ValueExpr
961 ) {
962 return value as BasicExpression | Aggregate
963 }
964 return toExpression(value)
965}
966
967function isPlainObject(value: any): value is Record<string, any> {
968 return (

Callers 1

buildNestedSelectFunction · 0.85

Calls 1

toExpressionFunction · 0.85

Tested by

no test coverage detected