Skip to main content
Version: 0.0.4

agrag.graphdb.serialize.node_params

node_params(record:NodeRecord) -> dict[str, Any]

Build the $records entry for a node upsert.

The Cutover Job tag is split out of properties into its own key because the upsert queries apply it with ON CREATE SET: a job tags the nodes it creates, never a node it writes over. Left inside the applied property map it would be set on existing nodes too, which would hide a committed node from retrieval for the job's duration and put it in reach of the job's rollback — and rollback deletes tagged rows.

Parameters:

  • record (NodeRecord) – The node record to serialize.

Returns:

  • dict[str, Any] – A dict with id (string), properties (converted, without
  • dict[str, Any] – the pending tag), and pending_job_id (the tag, or None).