Skip to main content

Module create

Module create 

Source
Expand description

uni.create.vNode / uni.create.vEdge — ephemeral (transient, in-query) graph entities. The APOC apoc.create.vNode / apoc.create.vRelationship analogues from proposal §4.13.1.

Ephemeral identities are minted from QueryProcedureHost::allocate_transient_id() and wrapped in Vid::ephemeral / Eid::ephemeral so their high bit (M5g EPHEMERAL_BIT) is set. Storage write entry points (execute_set_items_locked, execute_delete_vertex, execute_delete_edge_from_map) refuse any id with that bit set, surfacing UniError::EphemeralWriteAttempt.

Yield shape (M5g):

  • uni.create.vNode declares a single canonical vid Int64 field on its signature, tagged with _yield_kind = node_vid_source. That metadata tag opts the procedure into the planner’s node-shaped YIELD expansion: when the caller writes YIELD node, the planner rewrites the column projection to the canonical Node tuple (<n>._vid, <n>, <n>._labels, <n>.<prop> …). This is the same surface area as uni.vector.query and friends — downstream Cypher WITH node ... node.foo access works out of the box because the property columns are physically present on the row.
  • uni.create.vEdge declares a single edge field whose Arrow type is Struct(_eid, _type_name, _src, _dst, properties) — the canonical edge-struct shape used by path materialization (df_graph::common::edge_struct_fields). Unit tests assert the struct directly; downstream edge-property access is out of scope for M5g (the round-trip target was node.foo, not rel.foo).

Structs§

VEdgeProcedure
VNodeProcedure

Functions§

register_into
Register every uni.create.v* procedure into r.