Docs
This commit is contained in:
parent
3df0b941c8
commit
03d90d8630
@ -8,9 +8,10 @@ use std::fmt;
|
|||||||
pub struct Statement {
|
pub struct Statement {
|
||||||
/// The SQL query
|
/// The SQL query
|
||||||
pub sql: String,
|
pub sql: String,
|
||||||
/// The values for the SQL statement
|
/// The values for the SQL statement's parameters
|
||||||
pub values: Option<Values>,
|
pub values: Option<Values>,
|
||||||
/// The database backend to use
|
/// The database backend this statement is constructed for.
|
||||||
|
/// The SQL dialect and values should be valid for the DbBackend.
|
||||||
pub db_backend: DbBackend,
|
pub db_backend: DbBackend,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -31,7 +32,7 @@ impl Statement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Create a SQL statement from a [crate::DatabaseBackend], a
|
/// Create a SQL statement from a [crate::DatabaseBackend], a
|
||||||
/// raw SQL statement and defined values
|
/// raw SQL statement and param values
|
||||||
pub fn from_sql_and_values<I>(db_backend: DbBackend, sql: &str, values: I) -> Self
|
pub fn from_sql_and_values<I>(db_backend: DbBackend, sql: &str, values: I) -> Self
|
||||||
where
|
where
|
||||||
I: IntoIterator<Item = Value>,
|
I: IntoIterator<Item = Value>,
|
||||||
|
@ -11,7 +11,7 @@ use std::pin::Pin;
|
|||||||
#[cfg(feature = "with-json")]
|
#[cfg(feature = "with-json")]
|
||||||
use crate::JsonValue;
|
use crate::JsonValue;
|
||||||
|
|
||||||
/// Defines a type to do `SELECT` operations though a [SelectStatement] on a Model
|
/// Defines a type to do `SELECT` operations through a [SelectStatement] on a Model
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct Selector<S>
|
pub struct Selector<S>
|
||||||
where
|
where
|
||||||
|
Loading…
x
Reference in New Issue
Block a user