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