reifydb-transaction 0.4.13

Transaction management and concurrency control for ReifyDB
Documentation
// SPDX-License-Identifier: Apache-2.0
// Copyright (c) 2025 ReifyDB

use reifydb_core::{
	encoded::{key::EncodedKey, row::EncodedRow},
	interface::change::Change,
};
use reifydb_type::Result;

use crate::change::RowChange;

pub trait Write {
	fn set(&mut self, key: &EncodedKey, row: EncodedRow) -> Result<()>;
	fn unset(&mut self, key: &EncodedKey, row: EncodedRow) -> Result<()>;
	fn remove(&mut self, key: &EncodedKey) -> Result<()>;
	fn mark_preexisting(&mut self, key: &EncodedKey) -> Result<()>;

	/// Replicas implement this as a no-op (no CDC).
	fn track_row_change(&mut self, change: RowChange);

	/// Replicas implement this as a no-op (no transactional view processing).
	fn track_flow_change(&mut self, change: Change);
}