use crate::{
Error, SQLImplementation,
data_types::{SQLDataTypes, ToSQLData},
};
pub mod implement;
pub mod sql_implementations;
#[derive(Debug)]
pub struct UpdateProps {
pub connect: SQLImplementation,
pub set_match: Vec<SetMatch>,
pub table: String,
pub clause: Option<String>,
}
#[derive(Debug)]
pub struct SetMatch {
pub column: String,
pub value: SQLDataTypes,
pub query: bool,
}
pub trait UpdateBuilder {
fn set<T: ToSQLData>(self, column: &str, new_value: T) -> Self;
fn set_query(self, column: &str, query: &str) -> Self;
fn build(self) -> Result<(), Error>;
fn build_return_count(self) -> Result<usize, Error>;
}