pub struct Statement {
pub sql: String,
pub values: Option<Values>,
pub db_backend: DbBackend,
}
Expand description
Defines an SQL statement
Fieldsยง
ยงsql: String
The SQL query
values: Option<Values>
The values for the SQL statementโs parameters
db_backend: DbBackend
The database backend this statement is constructed for. The SQL dialect and values should be valid for the DbBackend.
Implementationsยง
Sourceยงimpl Statement
impl Statement
Sourcepub fn from_string<T>(db_backend: DbBackend, stmt: T) -> Statement
pub fn from_string<T>(db_backend: DbBackend, stmt: T) -> Statement
Create a Statement from a crate::DatabaseBackend and a raw SQL statement
Sourcepub fn from_sql_and_values<I, T>(
db_backend: DbBackend,
sql: T,
values: I,
) -> Self
pub fn from_sql_and_values<I, T>( db_backend: DbBackend, sql: T, values: I, ) -> Self
Create a SQL statement from a crate::DatabaseBackend, a raw SQL statement and param values
Trait Implementationsยง
impl StructuralPartialEq for Statement
Auto Trait Implementationsยง
impl Freeze for Statement
impl RefUnwindSafe for Statement
impl Send for Statement
impl Sync for Statement
impl Unpin for Statement
impl UnwindSafe for Statement
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
Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Sourceยงunsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
๐ฌThis is a nightly-only experimental API. (
clone_to_uninit
)Sourceยงimpl<T> Instrument for T
impl<T> Instrument for T
Sourceยงfn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Sourceยงfn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Sourceยงimpl<T> IntoEither for T
impl<T> IntoEither for T
Sourceยงfn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSourceยงfn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more