From d422ffe3d48d2061b4d3ddeb0c08796e4d71a5fa Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Wed, 5 Feb 2025 17:50:02 +0200 Subject: Remove Recordable trait, implement Python bindings, fixes --- log_db/src/record.rs | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'log_db/src/record.rs') diff --git a/log_db/src/record.rs b/log_db/src/record.rs index ab9f8dc..c373897 100644 --- a/log_db/src/record.rs +++ b/log_db/src/record.rs @@ -114,25 +114,6 @@ impl Record { } } -/// A trait that describes how to convert a data structure into a database record and vice versa. -pub trait Recordable { - /// The field type of the data structure implementing the `Recordable` trait. - type Field: Eq + Clone + Debug; - /// Define the schema of the instance implementing the `Recordable` trait. - fn schema() -> Vec<(Self::Field, Type)>; - /// Define the primary key of the instance implementing the `Recordable` trait. - fn primary_key() -> Self::Field; - /// Define the secondary keys of the instance implementing the `Recordable` trait. - fn secondary_keys() -> Vec { - Vec::new() - } - - /// Convert the data structure implementing the `Recordable` trait into a vector of database values. - fn into_record(self) -> Vec; - /// Convert a vector of database values into the data structure implementing the `Recordable` trait. - fn from_record(record: Vec) -> Self; -} - #[cfg(test)] mod tests { use super::*; -- cgit v1.3