(tables: FumaTables)
| 918 | // oxlint-enable executor/no-instanceof-error, executor/no-unknown-error-message |
| 919 | |
| 920 | const createDefaultMemoryDb = (tables: FumaTables): ExecutorDb => { |
| 921 | const version = "1.0.0"; |
| 922 | const latestSchema = fumaSchema<string, FumaTables, RelationsMap<FumaTables>>({ |
| 923 | version, |
| 924 | tables, |
| 925 | }); |
| 926 | const factory = fumadb({ |
| 927 | namespace: "executor_memory", |
| 928 | schemas: [latestSchema], |
| 929 | }); |
| 930 | |
| 931 | // oxlint-disable-next-line executor/no-double-cast -- boundary: fumadb's generic ORM client type doesn't structurally match the FumaDb facade |
| 932 | const db = factory.client(memoryAdapter()).orm(version) as unknown as FumaDb; |
| 933 | return { db }; |
| 934 | }; |
| 935 | |
| 936 | // --------------------------------------------------------------------------- |
| 937 | // JSON helpers + row → public projection conversions |
no test coverage detected