MCPcopy Index your code
hub / github.com/zenstackhq/zenstack / SchemaLookupCache

Interface SchemaLookupCache

packages/orm/src/client/query-utils.ts:29–33  ·  view source on GitHub ↗

* Structural lookups derived purely from the (immutable) schema. The schema does not * change for a client's lifetime, so these results are memoized per-schema and shared * across every consumer (orm query building + plugins). Keyed by the schema object so * the cache dies with the schema and nev

Source from the content-addressed store, hash-verified

27 * the cache dies with the schema and never leaks across schemas. See issue #2715.
28 */
29interface SchemaLookupCache {
30 model: Map<string, ModelDef | undefined>;
31 m2mRelation: Map<string, ReturnType<typeof computeManyToManyRelation>>;
32 m2mJoinTable?: Map<string, ManyToManyJoinTableEndpoints | undefined>;
33}
34
35const schemaLookupCache = new WeakMap<SchemaDef, SchemaLookupCache>();
36

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected