pub struct SqlOrderByComponent {
pub table_name: Name,
pub column_name: Name,
pub order_type: OrderType,
pub null_strategy: NullStrategy,
}
Expand description
Struct for generating the ORDER BY
clause.
Fields§
§table_name: Name
§column_name: Name
§order_type: OrderType
§null_strategy: NullStrategy
Implementations§
Source§impl SqlOrderByComponent
impl SqlOrderByComponent
Sourcepub fn to_mysql_order_by_clause_component<'a>(
&self,
s: &'a mut String,
) -> &'a str
pub fn to_mysql_order_by_clause_component<'a>( &self, s: &'a mut String, ) -> &'a str
Generate an ORDER BY
component for MySQL.
`<table_name>`.`<column_name>` <order_type>
Sourcepub fn format_mysql_order_by_components<'a>(
order_by_components: &[SqlOrderByComponent],
s: &'a mut String,
) -> &'a str
pub fn format_mysql_order_by_components<'a>( order_by_components: &[SqlOrderByComponent], s: &'a mut String, ) -> &'a str
Generate an ORDER BY
clause for MySQL.
If there is at least one component, the result string will starts with ORDER BY
, and concatenate a series of SqlOrderByComponent
s with ,
.
ORDER BY <SqlOrderByComponent[0]>, <SqlOrderByComponent[1]>
Source§impl SqlOrderByComponent
impl SqlOrderByComponent
Sourcepub fn to_sqlite_order_by_clause_component<'a>(
&self,
s: &'a mut String,
) -> &'a str
pub fn to_sqlite_order_by_clause_component<'a>( &self, s: &'a mut String, ) -> &'a str
Generate an ORDER BY
component for SQLite.
`<table_name>`.`<column_name>` <order_type>
Sourcepub fn format_sqlite_order_by_components<'a>(
order_by_components: &[SqlOrderByComponent],
s: &'a mut String,
) -> &'a str
pub fn format_sqlite_order_by_components<'a>( order_by_components: &[SqlOrderByComponent], s: &'a mut String, ) -> &'a str
Generate an ORDER BY
clause for SQLite.
If there is at least one component, the result string will starts with ORDER BY
, and concatenate a series of SqlOrderByComponent
s with ,
.
ORDER BY <SqlOrderByComponent[0]>, <SqlOrderByComponent[1]>
Trait Implementations§
Source§impl Clone for SqlOrderByComponent
impl Clone for SqlOrderByComponent
Source§fn clone(&self) -> SqlOrderByComponent
fn clone(&self) -> SqlOrderByComponent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for SqlOrderByComponent
impl RefUnwindSafe for SqlOrderByComponent
impl Send for SqlOrderByComponent
impl Sync for SqlOrderByComponent
impl Unpin for SqlOrderByComponent
impl UnwindSafe for SqlOrderByComponent
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