diff options
| author | Jan Tuomi <jan@jantuomi.fi> | 2025-02-05 17:50:02 +0200 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2025-02-09 23:52:26 +0200 |
| commit | d422ffe3d48d2061b4d3ddeb0c08796e4d71a5fa (patch) | |
| tree | 0b6820b060bf0cbeb2686a53a23c9ebee5654334 /log_db/src/record.rs | |
| parent | d4c953dc4bbd190dae4b5be69941f5c42c59af34 (diff) | |
Remove Recordable trait, implement Python bindings, fixes
Diffstat (limited to 'log_db/src/record.rs')
| -rw-r--r-- | log_db/src/record.rs | 19 |
1 files changed, 0 insertions, 19 deletions
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<Self::Field> { - Vec::new() - } - - /// Convert the data structure implementing the `Recordable` trait into a vector of database values. - fn into_record(self) -> Vec<Value>; - /// Convert a vector of database values into the data structure implementing the `Recordable` trait. - fn from_record(record: Vec<Value>) -> Self; -} - #[cfg(test)] mod tests { use super::*; |
