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

Function createDefaultMemoryDb

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

Source from the content-addressed store, hash-verified

755 storageFailureFromUnknown(`${hook} failed for plugin ${pluginId}`, cause);
756
757const createDefaultMemoryDb = (tables: FumaTables): ExecutorDb => {
758 const version = "1.0.0";
759 const latestSchema = fumaSchema<string, FumaTables, RelationsMap<FumaTables>>({
760 version,
761 tables,
762 });
763 const factory = fumadb({
764 namespace: "executor_memory",
765 schemas: [latestSchema],
766 });
767
768 // oxlint-disable-next-line executor/no-double-cast -- boundary: fumadb's generic ORM client type doesn't structurally match the FumaDb facade
769 const db = factory.client(memoryAdapter()).orm(version) as unknown as FumaDb;
770 return { db };
771};
772
773// ---------------------------------------------------------------------------
774// 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