diff --git a/akd/crates/akd_storage/src/sql_params.rs b/akd/crates/akd_storage/src/sql_params.rs index 6c617679de..7e1040755b 100644 --- a/akd/crates/akd_storage/src/sql_params.rs +++ b/akd/crates/akd_storage/src/sql_params.rs @@ -71,14 +71,6 @@ impl SqlParams { .collect() } - pub fn keys_except_columns(&self, excludes: Vec<&str>) -> Vec { - self.params - .iter() - .filter(|p| !excludes.contains(&p.column.as_str())) - .map(|p| p.key.clone()) - .collect() - } - pub fn key_for(&self, column: &str) -> Option { self.params .iter() @@ -93,28 +85,6 @@ impl SqlParams { .collect() } - pub fn columns_except(&self, excludes: Vec<&str>) -> Vec { - self.params - .iter() - .filter(|p| !excludes.contains(&p.column.as_str())) - .map(|p| p.column()) - .collect() - } - - pub fn columns_prefix_with(&self, prefix: &str) -> Vec { - self.params - .iter() - .map(|p| format!("{}{}", prefix, p.column())) - .collect() - } - - pub fn set_columns_equal(&self, assign_prefix: &str, source_prefix: &str) -> Vec { - self.params - .iter() - .map(|p| format!("{}{} = {}{}", assign_prefix, p.column(), source_prefix, p.column())) - .collect() - } - pub fn set_columns_equal_except( &self, assign_prefix: &str, @@ -135,58 +105,3 @@ impl SqlParams { .collect() } } - -pub struct VecStringBuilder<'a> { - strings: Vec, - ops: Vec>, -} - -enum StringBuilderOperation<'a> { - StringOperation(Box String + 'a>), - VectorOperation(Box) -> Vec + 'a>), -} - -impl<'a> VecStringBuilder<'a> { - pub fn new(strings: Vec) -> Self { - Self { - strings, - ops: Vec::new(), - } - } - - pub fn map(&mut self, op: F) - where - F: Fn(String) -> String + 'static, - { - self.ops.push(StringBuilderOperation::StringOperation(Box::new(op))); - } - - pub fn build(self) -> Vec { - let mut result = self.strings; - for op in self.ops { - match op { - StringBuilderOperation::StringOperation(f) => { - result = result.into_iter().map(f.as_ref()).collect(); - } - StringBuilderOperation::VectorOperation(f) => { - result = f(result); - } - } - } - result - } - - pub fn join(self, sep: &str) -> String { - self.build().join(sep) - } - - pub fn except(&mut self, excludes: Vec<&'a str>) { - self.ops.push(StringBuilderOperation::VectorOperation(Box::new( - move |vec: Vec| { - vec.into_iter() - .filter(|s| !excludes.contains(&s.as_str())) - .collect() - }, - ))); - } -} diff --git a/akd/crates/ms_database/Cargo.toml b/akd/crates/ms_database/Cargo.toml index 25ec3882e5..559866c5e4 100644 --- a/akd/crates/ms_database/Cargo.toml +++ b/akd/crates/ms_database/Cargo.toml @@ -21,6 +21,5 @@ tiberius = { version = "0.12.3", default-features = false, features = ["chrono", [target.'cfg(not(target_os = "macos"))'.workspace.dependencies] tiberius = { version = "0.12.3", features = ["chrono", "tokio"] } - [lints] workspace = true diff --git a/akd/crates/publisher/src/main.rs b/akd/crates/publisher/src/main.rs index 667c2eb7eb..b4279d80f7 100644 --- a/akd/crates/publisher/src/main.rs +++ b/akd/crates/publisher/src/main.rs @@ -1,5 +1,3 @@ -use tracing::{info, trace}; - #[tokio::main] async fn main() { tracing_subscriber::fmt()