pub struct SelectStatement {Show 17 fields
pub fields: Fields,
pub omit: Vec<Expr>,
pub only: bool,
pub what: Vec<Expr>,
pub with: Option<With>,
pub cond: Option<Cond>,
pub split: Option<Splits>,
pub group: Option<Groups>,
pub order: Option<Ordering>,
pub limit: Option<Limit>,
pub start: Option<Start>,
pub fetch: Option<Fetchs>,
pub version: Expr,
pub timeout: Expr,
pub explain: Option<Explain>,
pub tempfiles: bool,
pub for_update: bool,
}Fields§
§fields: FieldsThe fields to extract from the records.
The foo,bar part in SELECT foo,bar FROM baz.
omit: Vec<Expr>The fields to omit from the records. This is used to exclude fields from wildcard selection.
The OMIT foo,bar part in SELECT foo,bar OMIT baz,qux FROM baz.
only: boolWhether to only return a single record.
The ONLY part in SELECT * FROM ONLY foo.
what: Vec<Expr>The expressions (tables, record IDs, arrays, etc) to select from.
The baz part in SELECT foo,bar FROM baz.
with: Option<With>§cond: Option<Cond>The WHERE clause.
split: Option<Splits>The SPLIT clause.
This is used to produce the cartesian product of the values in split fields.
group: Option<Groups>§order: Option<Ordering>§limit: Option<Limit>§start: Option<Start>§fetch: Option<Fetchs>§version: Expr§timeout: Expr§explain: Option<Explain>§tempfiles: bool§for_update: boolWhether the read locks the selected records for the duration of the transaction.
The FOR UPDATE part in SELECT * FROM foo FOR UPDATE.
Implementations§
Source§impl SelectStatement
impl SelectStatement
Sourcepub fn read_only(&self) -> bool
pub fn read_only(&self) -> bool
Check if computing this type can be done on a read only transaction. Whether computing this statement can be done on a read-only transaction.
Every clause that can carry a user expression is inspected. The
executor picks the transaction type from this before the statement is
planned, so a clause omitted here would let a mutation reach a
read-only transaction and fail partway through the statement.
A FOR UPDATE read always requires a write transaction: the locked
reads register the fetched keys for commit-time conflict detection,
which storage engines only support on writeable transactions.
Trait Implementations§
Source§impl Clone for SelectStatement
impl Clone for SelectStatement
Source§impl Debug for SelectStatement
impl Debug for SelectStatement
impl Eq for SelectStatement
Source§impl From<SelectStatement> for SelectStatement
impl From<SelectStatement> for SelectStatement
Source§fn from(v: SelectStatement) -> Self
fn from(v: SelectStatement) -> Self
Source§impl From<SelectStatement> for SelectStatement
impl From<SelectStatement> for SelectStatement
Source§fn from(v: SelectStatement) -> Self
fn from(v: SelectStatement) -> Self
Source§impl Hash for SelectStatement
impl Hash for SelectStatement
Source§impl PartialEq for SelectStatement
impl PartialEq for SelectStatement
impl StructuralPartialEq for SelectStatement
Source§impl<V: Visitor> Visit<V> for SelectStatement
impl<V: Visitor> Visit<V> for SelectStatement
Auto Trait Implementations§
impl !Freeze for SelectStatement
impl RefUnwindSafe for SelectStatement
impl Send for SelectStatement
impl Sync for SelectStatement
impl Unpin for SelectStatement
impl UnsafeUnpin for SelectStatement
impl UnwindSafe for SelectStatement
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.