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