aboutsummaryrefslogtreecommitdiffstats
path: root/log_db/src/row.rs
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2025-02-21 16:15:29 +0200
committerJan Tuomi <jan@jantuomi.fi>2025-02-21 16:15:29 +0200
commitdaca0e6b68d32d885face00d68df5b5cb00e098b (patch)
tree60a3c73463efde0f890fdd681f438b504477d04a /log_db/src/row.rs
parent18ae1c7ad6d45f42f39472f5b76b3f19d2b357b1 (diff)
Remove <T> polymorphism from DB, replace with From<T> based approach
Diffstat (limited to 'log_db/src/row.rs')
-rw-r--r--log_db/src/row.rs15
1 files changed, 2 insertions, 13 deletions
diff --git a/log_db/src/row.rs b/log_db/src/row.rs
index 5ebb069..d8140d2 100644
--- a/log_db/src/row.rs
+++ b/log_db/src/row.rs
@@ -37,17 +37,6 @@ impl Row {
}
Row { values, tombstone }
}
-
- pub fn from(values: &[Value]) -> Row {
- Row {
- values: values.to_vec(),
- tombstone: false,
- }
- }
-
- pub fn at(&self, index: usize) -> &Value {
- &self.values[index]
- }
}
#[cfg(test)]
@@ -76,6 +65,6 @@ mod tests {
#[derive(Clone, Debug)]
pub enum TxEntry {
- Upsert { record: Row },
- Delete { record: Row },
+ Upsert { row: Row },
+ Delete { row: Row },
}