pub trait WriteTracker: Send + Sync {
// Required methods
fn record_node_write(
&self,
transaction_id: TransactionId,
node_id: NodeId,
) -> Result<(), OperatorError>;
fn record_edge_write(
&self,
transaction_id: TransactionId,
edge_id: EdgeId,
) -> Result<(), OperatorError>;
}Expand description
Trait for recording write operations during query execution.
This bridges grafeo-core mutation operators (which perform writes) with
grafeo-engine’s TransactionManager (which tracks write sets for conflict
detection). The trait lives in grafeo-core to avoid circular dependencies.
Required Methods§
Sourcefn record_node_write(
&self,
transaction_id: TransactionId,
node_id: NodeId,
) -> Result<(), OperatorError>
fn record_node_write( &self, transaction_id: TransactionId, node_id: NodeId, ) -> Result<(), OperatorError>
Records that a node was written (created, deleted, or modified).
Returns an error if a write-write conflict is detected (first-writer-wins).
Sourcefn record_edge_write(
&self,
transaction_id: TransactionId,
edge_id: EdgeId,
) -> Result<(), OperatorError>
fn record_edge_write( &self, transaction_id: TransactionId, edge_id: EdgeId, ) -> Result<(), OperatorError>
Records that an edge was written (created, deleted, or modified).
Returns an error if a write-write conflict is detected (first-writer-wins).