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

Function getCaseWhenValueIndexes

packages/db/src/query/builder/functions.ts:763–777  ·  view source on GitHub ↗
(argCount: number)

Source from the content-addressed store, hash-verified

761}
762
763function getCaseWhenValueIndexes(argCount: number): Array<number> {
764 const valueIndexes: Array<number> = []
765 const hasDefaultValue = argCount % 2 === 1
766 const pairCount = Math.floor(argCount / 2)
767
768 for (let i = 0; i < pairCount; i++) {
769 valueIndexes.push(i * 2 + 1)
770 }
771
772 if (hasDefaultValue) {
773 valueIndexes.push(argCount - 1)
774 }
775
776 return valueIndexes
777}
778
779function isExpressionValue(value: CaseWhenValue | undefined): boolean {
780 if (isRefProxy(value)) return true

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…