MCPcopy Create free account
hub / github.com/effect-app/libs / nsPartitionValue

Function nsPartitionValue

packages/infra/src/Store/Cosmos.ts:117–120  ·  view source on GitHub ↗
(ns: string, e?: Encoded)

Source from the content-addressed store, hash-verified

115 const basePartitionKey = config?.partitionValue() ?? "primary"
116 const nsPrefix = (ns: string) => ns === "primary" ? "" : `${ns}::`
117 const nsPartitionValue = (ns: string, e?: Encoded) => {
118 const base = config?.partitionValue(e) ?? "primary"
119 return `${nsPrefix(ns)}${base}`
120 }
121 const nsBasePartitionKey = (ns: string) => `${nsPrefix(ns)}${basePartitionKey}`
122 const resolveNamespace = !config?.allowNamespace
123 ? Effect.succeed("primary")

Callers 3

bulkSetInternalFunction · 0.85
batchSetFunction · 0.85
Cosmos.tsFile · 0.85

Calls 1

nsPrefixFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…