(tables: FumaTables)
| 493 | storageFailureFromUnknown(`${hook} failed for plugin ${pluginId}`, cause); |
| 494 | |
| 495 | const createDefaultMemoryDb = (tables: FumaTables): ExecutorDb => { |
| 496 | const version = "1.0.0"; |
| 497 | const latestSchema = fumaSchema<string, FumaTables, RelationsMap<FumaTables>>({ |
| 498 | version, |
| 499 | tables, |
| 500 | }); |
| 501 | const factory = fumadb({ |
| 502 | namespace: "executor_memory", |
| 503 | schemas: [latestSchema], |
| 504 | }); |
| 505 | |
| 506 | // oxlint-disable-next-line executor/no-double-cast -- boundary: fumadb's generic ORM client type doesn't structurally match the FumaDb facade |
| 507 | const db = factory.client(memoryAdapter()).orm(version) as unknown as FumaDb; |
| 508 | return { db }; |
| 509 | }; |
| 510 | |
| 511 | // --------------------------------------------------------------------------- |
| 512 | // JSON helpers + row → public projection conversions |
no test coverage detected