mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-18 00:54:19 +01:00
18 lines
411 B
Rust
18 lines
411 B
Rust
use std::fmt::Display;
|
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
use super::predicate::Predicate;
|
|
|
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
|
pub struct Delete {
|
|
pub table: String,
|
|
pub predicate: Predicate,
|
|
}
|
|
|
|
impl Display for Delete {
|
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
write!(f, "DELETE FROM {} WHERE {}", self.table, self.predicate)
|
|
}
|
|
}
|