core/mvcc: Add RowID::new() and Row::new() helpers

This commit is contained in:
Pekka Enberg
2025-03-06 09:29:19 +02:00
parent 4247974f95
commit 5d0982f5db

View File

@@ -17,6 +17,12 @@ pub struct RowID {
pub row_id: u64,
}
impl RowID {
pub fn new(table_id: u64, row_id: u64) -> Self {
Self { table_id, row_id }
}
}
#[derive(Clone, Debug, PartialEq, PartialOrd)]
pub struct Row {
@@ -24,6 +30,12 @@ pub struct Row {
pub data: Vec<u8>,
}
impl Row {
pub fn new(id: RowID, data: Vec<u8>) -> Self {
Self { id, data }
}
}
/// A row version.
#[derive(Clone, Debug, PartialEq)]
pub struct RowVersion {