diff --git a/core/mvcc/database/mod.rs b/core/mvcc/database/mod.rs index d811794e4..f0d80f8ad 100644 --- a/core/mvcc/database/mod.rs +++ b/core/mvcc/database/mod.rs @@ -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, } +impl Row { + pub fn new(id: RowID, data: Vec) -> Self { + Self { id, data } + } +} + /// A row version. #[derive(Clone, Debug, PartialEq)] pub struct RowVersion {