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

Function createDefaultMemoryDb

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

Source from the content-addressed store, hash-verified

866// oxlint-enable executor/no-instanceof-error, executor/no-unknown-error-message
867
868const createDefaultMemoryDb = (tables: FumaTables): ExecutorDb => {
869 const version = "1.0.0";
870 const latestSchema = fumaSchema<string, FumaTables, RelationsMap<FumaTables>>({
871 version,
872 tables,
873 });
874 const factory = fumadb({
875 namespace: "executor_memory",
876 schemas: [latestSchema],
877 });
878
879 // oxlint-disable-next-line executor/no-double-cast -- boundary: fumadb's generic ORM client type doesn't structurally match the FumaDb facade
880 const db = factory.client(memoryAdapter()).orm(version) as unknown as FumaDb;
881 return { db };
882};
883
884// ---------------------------------------------------------------------------
885// 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