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

Function compileSelectObject

packages/db/src/query/compiler/select.ts:167–184  ·  view source on GitHub ↗
(
  obj: Record<string, any>,
)

Source from the content-addressed store, hash-verified

165}
166
167function compileSelectObject(
168 obj: Record<string, any>,
169): (row: NamespacedRow) => any {
170 const ops: Array<SelectOp> = []
171 addFromObject([], obj, ops)
172
173 return (row) => {
174 const selectResults: Record<string, any> = {}
175 for (const op of ops) {
176 if (op.kind === `merge`) {
177 processMerge(op, row, selectResults)
178 } else {
179 processNonMergeOp(op, row, selectResults)
180 }
181 }
182 return selectResults
183 }
184}
185
186function compileSelectValue(
187 value: SelectValueExpression | null | undefined,

Callers 1

compileSelectValueFunction · 0.85

Calls 3

addFromObjectFunction · 0.85
processMergeFunction · 0.85
processNonMergeOpFunction · 0.85

Tested by

no test coverage detected