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

Function processArgument

packages/db/src/query/compiler/select.ts:262–275  ·  view source on GitHub ↗
(
  arg: BasicExpression | Aggregate,
  namespacedRow: NamespacedRow,
)

Source from the content-addressed store, hash-verified

260 * Processes a single argument in a function context
261 */
262export function processArgument(
263 arg: BasicExpression | Aggregate,
264 namespacedRow: NamespacedRow,
265): any {
266 if (isAggregateExpression(arg)) {
267 throw new AggregateNotSupportedError()
268 }
269
270 // Pre-compile the expression and evaluate immediately
271 const compiledExpression = compileExpression(arg)
272 const value = compiledExpression(namespacedRow)
273
274 return value
275}
276
277/**
278 * Helper function to check if an object is a nested select object

Callers 1

select.test.tsFile · 0.85

Calls 2

isAggregateExpressionFunction · 0.85
compileExpressionFunction · 0.70

Tested by

no test coverage detected