pub struct ReservedWords {
pub id: i32,
pub select_field: String,
pub where_field: i32,
pub group_field: bool,
pub order_field: Option<String>,
pub limit_field: f64,
}Fields§
§id: i32§select_field: String§where_field: i32§group_field: bool§order_field: Option<String>§limit_field: f64Trait Implementations§
Source§impl AsEntity for ReservedWords
impl AsEntity for ReservedWords
type Entity = ReservedWords
fn as_entity(&self) -> &ReservedWords
Source§impl AsEntity for &ReservedWords
impl AsEntity for &ReservedWords
type Entity = ReservedWords
fn as_entity(&self) -> &ReservedWords
Source§impl Debug for ReservedWords
impl Debug for ReservedWords
Source§impl Entity for ReservedWords
impl Entity for ReservedWords
Source§type PrimaryKey<'a> = (&'a i32,)
type PrimaryKey<'a> = (&'a i32,)
Primary key type. A tuple of field types (or single type) forming the PK.
Source§fn primary_key_def() -> &'static [&'static ColumnDef]
fn primary_key_def() -> &'static [&'static ColumnDef]
Primary key column definitions. Empty if no PK defined.
Source§fn primary_key<'a>(&'a self) -> Self::PrimaryKey<'a>
fn primary_key<'a>(&'a self) -> Self::PrimaryKey<'a>
Extract PK value(s) from
self.Source§fn primary_key_expr(&self) -> impl Expression
fn primary_key_expr(&self) -> impl Expression
Build an expression matching the PK of
self.Source§fn unique_defs() -> impl ExactSizeIterator<Item = impl ExactSizeIterator<Item = &'static ColumnDef>>
fn unique_defs() -> impl ExactSizeIterator<Item = impl ExactSizeIterator<Item = &'static ColumnDef>>
Unique constraint definitions.
Source§fn row_values(&self) -> RowValues
fn row_values(&self) -> RowValues
Full row representation including all persisted columns.
Source§fn create_table(
executor: &mut impl Executor,
if_not_exists: bool,
create_schema: bool,
) -> impl Future<Output = Result<(), Error>> + Sendwhere
Self: Sized,
fn create_table(
executor: &mut impl Executor,
if_not_exists: bool,
create_schema: bool,
) -> impl Future<Output = Result<(), Error>> + Sendwhere
Self: Sized,
Create table (and optional schema). Read more
Source§fn drop_table(
executor: &mut impl Executor,
if_exists: bool,
drop_schema: bool,
) -> impl Future<Output = Result<(), Error>> + Sendwhere
Self: Sized,
fn drop_table(
executor: &mut impl Executor,
if_exists: bool,
drop_schema: bool,
) -> impl Future<Output = Result<(), Error>> + Sendwhere
Self: Sized,
Drop the table (and optional schema). Read more
Source§fn insert_one(
executor: &mut impl Executor,
entity: impl AsEntity,
) -> impl Future<Output = Result<RowsAffected, Error>> + Send
fn insert_one( executor: &mut impl Executor, entity: impl AsEntity, ) -> impl Future<Output = Result<RowsAffected, Error>> + Send
Insert a single entity.
Source§fn insert_many<It>(
executor: &mut impl Executor,
items: It,
) -> impl Future<Output = Result<RowsAffected, Error>> + Sendwhere
Self: Sized,
It: IntoIterator + Send,
<It as IntoIterator>::IntoIter: Send,
<It as IntoIterator>::Item: AsEntity,
fn insert_many<It>(
executor: &mut impl Executor,
items: It,
) -> impl Future<Output = Result<RowsAffected, Error>> + Sendwhere
Self: Sized,
It: IntoIterator + Send,
<It as IntoIterator>::IntoIter: Send,
<It as IntoIterator>::Item: AsEntity,
Bulk insert entities.
Source§fn prepare_find<Exec>(
executor: &mut Exec,
condition: impl Expression,
limit: Option<u32>,
) -> impl Future<Output = Result<Query<<Exec as Executor>::Driver>, Error>> + Sendwhere
Exec: Executor,
fn prepare_find<Exec>(
executor: &mut Exec,
condition: impl Expression,
limit: Option<u32>,
) -> impl Future<Output = Result<Query<<Exec as Executor>::Driver>, Error>> + Sendwhere
Exec: Executor,
Prepare (but do not yet run) a SQL select query. Read more
Source§fn find_one(
executor: &mut impl Executor,
condition: impl Expression,
) -> impl Future<Output = Result<Option<Self>, Error>> + Sendwhere
Self: Sized,
fn find_one(
executor: &mut impl Executor,
condition: impl Expression,
) -> impl Future<Output = Result<Option<Self>, Error>> + Sendwhere
Self: Sized,
Finds the first entity matching a condition expression. Read more
Source§fn find_many(
executor: &mut impl Executor,
condition: impl Expression,
limit: Option<u32>,
) -> impl Stream<Item = Result<Self, Error>> + Sendwhere
Self: Sized,
fn find_many(
executor: &mut impl Executor,
condition: impl Expression,
limit: Option<u32>,
) -> impl Stream<Item = Result<Self, Error>> + Sendwhere
Self: Sized,
Streams entities matching a condition. Read more
Source§fn delete_many(
executor: &mut impl Executor,
condition: impl Expression,
) -> impl Future<Output = Result<RowsAffected, Error>> + Sendwhere
Self: Sized,
fn delete_many(
executor: &mut impl Executor,
condition: impl Expression,
) -> impl Future<Output = Result<RowsAffected, Error>> + Sendwhere
Self: Sized,
Deletes all entities matching a condition. Read more
Source§impl Expression for ReservedWords
impl Expression for ReservedWords
Source§fn write_query(
&self,
writer: &dyn SqlWriter,
context: &mut Context,
out: &mut DynQuery,
)
fn write_query( &self, writer: &dyn SqlWriter, context: &mut Context, out: &mut DynQuery, )
Generates the SQL representation of this expression.
Source§fn accept_visitor(
&self,
_matcher: &mut dyn ExpressionVisitor,
_writer: &dyn SqlWriter,
_context: &mut Context,
_out: &mut DynQuery,
) -> bool
fn accept_visitor( &self, _matcher: &mut dyn ExpressionVisitor, _writer: &dyn SqlWriter, _context: &mut Context, _out: &mut DynQuery, ) -> bool
Traverses the expression with a visitor. Read more
Source§fn as_identifier(&self, context: &mut Context) -> String
fn as_identifier(&self, context: &mut Context) -> String
Renders the expression as a string suitable for use as an identifier.
Source§impl OpPrecedence for ReservedWords
impl OpPrecedence for ReservedWords
Source§fn precedence(&self, _: &dyn SqlWriter) -> i32
fn precedence(&self, _: &dyn SqlWriter) -> i32
Lower numbers bind weaker, writers parenthesize when child precedence <= operator precedence.
Source§impl PartialEq for ReservedWords
impl PartialEq for ReservedWords
Source§impl ReservedWordsColumnTrait for ReservedWords
impl ReservedWordsColumnTrait for ReservedWords
const id: ColumnRef
const select_field: ColumnRef
const where_field: ColumnRef
const group_field: ColumnRef
const order_field: ColumnRef
const limit_field: ColumnRef
impl StructuralPartialEq for ReservedWords
Auto Trait Implementations§
impl Freeze for ReservedWords
impl RefUnwindSafe for ReservedWords
impl Send for ReservedWords
impl Sync for ReservedWords
impl Unpin for ReservedWords
impl UnsafeUnpin for ReservedWords
impl UnwindSafe for ReservedWords
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<E> Dataset for Ewhere
E: Entity,
impl<E> Dataset for Ewhere
E: Entity,
Source§fn qualified_columns() -> boolwhere
E: Sized,
fn qualified_columns() -> boolwhere
E: Sized,
Indicates whether column names should be fully qualified with schema and table name.
For entities this returns false to keep queries concise, for joins it returns true.