mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-09 10:14:21 +01:00
core/mvcc: Add RowID::new() and Row::new() helpers
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user