pub struct NodeSpec {
pub node_key: NodeKey,
pub type_id: GtsTypeId,
pub name: Option<String>,
pub payload: Option<Value>,
pub expected_version: Option<i64>,
}Expand description
A node submitted for ingest. An upsert replaces the row’s mutable state wholesale: a field the request omits is cleared, never preserved.
Fields§
§node_key: NodeKey§type_id: GtsTypeId§name: Option<String>§payload: Option<Value>GTS-validated attributes. None = no opinion on an existing row’s
payload is not offered — ingest is replace, so None clears.
expected_version: Option<i64>Optional compare-and-set on the node’s stored version.
A stored version is 1 or more and advances on every update. Some(n)
with n >= 1 requires the stored version to be exactly n, and is a
conflict when it is not – including when no node is stored under the
key at all. Some(0) means “there must be no node under this key”:
the one conditional a producer can make without a version to read
back, and the way to claim a key exactly once across writers. Edges
carry no version: their identity is derived from their endpoints.