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

Function createDefaultMemoryDb

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

Source from the content-addressed store, hash-verified

717 storageFailureFromUnknown(`${hook} failed for plugin ${pluginId}`, cause);
718
719const createDefaultMemoryDb = (tables: FumaTables): ExecutorDb => {
720 const version = "1.0.0";
721 const latestSchema = fumaSchema<string, FumaTables, RelationsMap<FumaTables>>({
722 version,
723 tables,
724 });
725 const factory = fumadb({
726 namespace: "executor_memory",
727 schemas: [latestSchema],
728 });
729
730 // oxlint-disable-next-line executor/no-double-cast -- boundary: fumadb's generic ORM client type doesn't structurally match the FumaDb facade
731 const db = factory.client(memoryAdapter()).orm(version) as unknown as FumaDb;
732 return { db };
733};
734
735// ---------------------------------------------------------------------------
736// 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