Struct rdb_pagination::SqlOrderByComponent
source · pub struct SqlOrderByComponent {
pub table_name: Name,
pub column_name: Name,
pub order_type: OrderType,
}
Expand description
Struct for generating the ORDER BY
clause.
Fields§
§table_name: Name
§column_name: Name
§order_type: OrderType
Implementations§
source§impl SqlOrderByComponent
impl SqlOrderByComponent
sourcepub fn to_mysql_order_by_clause_component<'a>(
&self,
s: &'a mut String,
) -> &'a str
Available on crate feature mysql
only.
pub fn to_mysql_order_by_clause_component<'a>( &self, s: &'a mut String, ) -> &'a str
mysql
only.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
Available on crate feature mysql
only.
pub fn format_mysql_order_by_components<'a>( order_by_components: &[SqlOrderByComponent], s: &'a mut String, ) -> &'a str
mysql
only.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
Available on crate feature sqlite
only.
pub fn to_sqlite_order_by_clause_component<'a>( &self, s: &'a mut String, ) -> &'a str
sqlite
only.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
Available on crate feature sqlite
only.
pub fn format_sqlite_order_by_components<'a>( order_by_components: &[SqlOrderByComponent], s: &'a mut String, ) -> &'a str
sqlite
only.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 copy 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
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
)