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

Function pluginStorageEntryFromRow

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

Source from the content-addressed store, hash-verified

1393// ---------------------------------------------------------------------------
1394
1395const pluginStorageEntryFromRow = <T>(row: CoreRow<"plugin_storage">): PluginStorageEntry<T> => ({
1396 id: pluginStorageId({
1397 pluginId: row.plugin_id,
1398 collection: row.collection,
1399 key: row.key,
1400 }),
1401 owner: row.owner as Owner,
1402 pluginId: row.plugin_id,
1403 collection: row.collection,
1404 key: row.key,
1405 data: row.data as T,
1406 createdAt: row.created_at instanceof Date ? row.created_at : new Date(row.created_at),
1407 updatedAt: row.updated_at instanceof Date ? row.updated_at : new Date(row.updated_at),
1408});
1409
1410const pluginStorageIndexSpecFields = (spec: PluginStorageRuntimeIndexSpec): readonly string[] =>
1411 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