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

Function pluginStorageEntryFromRow

packages/core/sdk/src/executor.ts:1362–1375  ·  view source on GitHub ↗
(row: CoreRow<"plugin_storage">)

Source from the content-addressed store, hash-verified

1360// ---------------------------------------------------------------------------
1361
1362const pluginStorageEntryFromRow = <T>(row: CoreRow<"plugin_storage">): PluginStorageEntry<T> => ({
1363 id: pluginStorageId({
1364 pluginId: row.plugin_id,
1365 collection: row.collection,
1366 key: row.key,
1367 }),
1368 owner: row.owner as Owner,
1369 pluginId: row.plugin_id,
1370 collection: row.collection,
1371 key: row.key,
1372 data: row.data as T,
1373 createdAt: row.created_at instanceof Date ? row.created_at : new Date(row.created_at),
1374 updatedAt: row.updated_at instanceof Date ? row.updated_at : new Date(row.updated_at),
1375});
1376
1377const pluginStorageIndexSpecFields = (spec: PluginStorageRuntimeIndexSpec): readonly string[] =>
1378 typeof spec === "string" ? [spec] : spec;

Callers 5

getVisibleFunction · 0.85
getForOwnerImplFunction · 0.85
putImplFunction · 0.85
queryCollectionFunction · 0.85
makePluginStorageFacadeFunction · 0.85

Calls 1

pluginStorageIdFunction · 0.90

Tested by

no test coverage detected