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

Function encodeKeyForUnionBranch

packages/db/src/query/compiler/index.ts:1283–1294  ·  view source on GitHub ↗
(key: unknown)

Source from the content-addressed store, hash-verified

1281}
1282
1283function encodeKeyForUnionBranch(key: unknown): string {
1284 if (typeof key === `string`) {
1285 return `string:${key}`
1286 }
1287 if (typeof key === `number`) {
1288 return `number:${String(key)}`
1289 }
1290 if (typeof key === `bigint`) {
1291 return `bigint:${String(key)}`
1292 }
1293 return `${typeof key}:${JSON.stringify(key)}`
1294}
1295
1296function processFrom(
1297 from: CollectionRef | QueryRef,

Callers 2

processFromClauseFunction · 0.85
processUnionAllFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected