use crate::identifier::Identifier;
use crate::types::AnySurrealType;
use vantage_expressions::Expressive;
use super::SurrealDelete;
impl SurrealDelete {
pub fn table(table: &str) -> Self {
Self {
target: Identifier::new(table).expr(),
conditions: Vec::new(),
}
}
pub fn new(target: impl Expressive<AnySurrealType>) -> Self {
Self {
target: target.expr(),
conditions: Vec::new(),
}
}
pub fn with_condition(mut self, condition: impl Expressive<AnySurrealType>) -> Self {
self.conditions.push(condition.expr());
self
}
}