(row: CoreRow<"plugin_storage">)
| 1379 | // --------------------------------------------------------------------------- |
| 1380 | |
| 1381 | const pluginStorageEntryFromRow = <T>(row: CoreRow<"plugin_storage">): PluginStorageEntry<T> => ({ |
| 1382 | id: pluginStorageId({ |
| 1383 | pluginId: row.plugin_id, |
| 1384 | collection: row.collection, |
| 1385 | key: row.key, |
| 1386 | }), |
| 1387 | owner: row.owner as Owner, |
| 1388 | pluginId: row.plugin_id, |
| 1389 | collection: row.collection, |
| 1390 | key: row.key, |
| 1391 | data: row.data as T, |
| 1392 | createdAt: row.created_at instanceof Date ? row.created_at : new Date(row.created_at), |
| 1393 | updatedAt: row.updated_at instanceof Date ? row.updated_at : new Date(row.updated_at), |
| 1394 | }); |
| 1395 | |
| 1396 | const pluginStorageIndexSpecFields = (spec: PluginStorageRuntimeIndexSpec): readonly string[] => |
| 1397 | typeof spec === "string" ? [spec] : spec; |
no test coverage detected