MCPcopy Create free account
hub / github.com/electric-sql/electric / getRowKey

Function getRowKey

packages/agents-runtime/src/setup-context.ts:424–435  ·  view source on GitHub ↗
(
      collName: string,
      row: Record<string, unknown>
    )

Source from the content-addressed store, hash-verified

422 }
423
424 const getRowKey = (
425 collName: string,
426 row: Record<string, unknown>
427 ): string => {
428 const key = row[getPrimaryKey(collName)]
429 if (typeof key !== `string`) {
430 throw new Error(
431 `[agent-runtime] Shared state "${id}" collection "${collName}" requires string primary keys`
432 )
433 }
434 return key
435 }
436
437 const stripVirtualFields = (
438 row: Record<string, unknown> | undefined

Callers 1

createStagedCollectionFunction · 0.85

Calls 1

getPrimaryKeyFunction · 0.85

Tested by

no test coverage detected