MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / createDefaultMemoryDb

Function createDefaultMemoryDb

packages/core/sdk/src/executor.ts:494–508  ·  view source on GitHub ↗
(tables: FumaTables)

Source from the content-addressed store, hash-verified

492 storageFailureFromUnknown(`${hook} failed for plugin ${pluginId}`, cause);
493
494const 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

Callers 1

createExecutorFunction · 0.85

Calls 2

fumadbFunction · 0.90
memoryAdapterFunction · 0.90

Tested by

no test coverage detected