pub struct DeleteBuilder { /* private fields */ }Expand description
Fluent builder for DELETE queries.
§Example
use oxisql_core::query::DeleteBuilder;
let q = DeleteBuilder::new()
.from("users")
.where_eq("id", &99i64)
.build();
assert_eq!(q.sql, "DELETE FROM users WHERE id = $1");Implementations§
Source§impl DeleteBuilder
impl DeleteBuilder
Sourcepub fn where_raw(self, cond: &str) -> Self
pub fn where_raw(self, cond: &str) -> Self
Add a raw WHERE condition. Call multiple times to AND them.
Sourcepub fn where_eq(self, col: &str, val: &dyn ToSqlValue) -> Self
pub fn where_eq(self, col: &str, val: &dyn ToSqlValue) -> Self
Add a WHERE col = $N condition, binding the value.
Sourcepub fn build(self) -> BuiltQuery
pub fn build(self) -> BuiltQuery
Build the query into a BuiltQuery.
Trait Implementations§
Source§impl Clone for DeleteBuilder
impl Clone for DeleteBuilder
Source§fn clone(&self) -> DeleteBuilder
fn clone(&self) -> DeleteBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeleteBuilder
impl Debug for DeleteBuilder
Source§impl Default for DeleteBuilder
impl Default for DeleteBuilder
Source§fn default() -> DeleteBuilder
fn default() -> DeleteBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DeleteBuilder
impl RefUnwindSafe for DeleteBuilder
impl Send for DeleteBuilder
impl Sync for DeleteBuilder
impl Unpin for DeleteBuilder
impl UnsafeUnpin for DeleteBuilder
impl UnwindSafe for DeleteBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more