(tables: FumaTables)
| 866 | // oxlint-enable executor/no-instanceof-error, executor/no-unknown-error-message |
| 867 | |
| 868 | const createDefaultMemoryDb = (tables: FumaTables): ExecutorDb => { |
| 869 | const version = "1.0.0"; |
| 870 | const latestSchema = fumaSchema<string, FumaTables, RelationsMap<FumaTables>>({ |
| 871 | version, |
| 872 | tables, |
| 873 | }); |
| 874 | const factory = fumadb({ |
| 875 | namespace: "executor_memory", |
| 876 | schemas: [latestSchema], |
| 877 | }); |
| 878 | |
| 879 | // oxlint-disable-next-line executor/no-double-cast -- boundary: fumadb's generic ORM client type doesn't structurally match the FumaDb facade |
| 880 | const db = factory.client(memoryAdapter()).orm(version) as unknown as FumaDb; |
| 881 | return { db }; |
| 882 | }; |
| 883 | |
| 884 | // --------------------------------------------------------------------------- |
| 885 | // JSON helpers + row → public projection conversions |
no test coverage detected