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

Function createDefaultMemoryDb

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

Source from the content-addressed store, hash-verified

918// oxlint-enable executor/no-instanceof-error, executor/no-unknown-error-message
919
920const createDefaultMemoryDb = (tables: FumaTables): ExecutorDb => {
921 const version = "1.0.0";
922 const latestSchema = fumaSchema<string, FumaTables, RelationsMap<FumaTables>>({
923 version,
924 tables,
925 });
926 const factory = fumadb({
927 namespace: "executor_memory",
928 schemas: [latestSchema],
929 });
930
931 // oxlint-disable-next-line executor/no-double-cast -- boundary: fumadb's generic ORM client type doesn't structurally match the FumaDb facade
932 const db = factory.client(memoryAdapter()).orm(version) as unknown as FumaDb;
933 return { db };
934};
935
936// ---------------------------------------------------------------------------
937// 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