pub struct DistinctOn {
pub columns: Vec<String>,
}Expand description
DISTINCT ON clause (PostgreSQL specific).
Fields§
§columns: Vec<String>Columns to distinct on.
Implementations§
Source§impl DistinctOn
impl DistinctOn
Sourcepub fn to_postgres_sql(&self) -> String
pub fn to_postgres_sql(&self) -> String
Generate PostgreSQL DISTINCT ON clause.
Sourcepub fn to_mysql_workaround(&self) -> String
pub fn to_mysql_workaround(&self) -> String
Generate MySQL workaround using GROUP BY. Note: This is not exactly equivalent to DISTINCT ON.
Trait Implementations§
Source§impl Clone for DistinctOn
impl Clone for DistinctOn
Source§fn clone(&self) -> DistinctOn
fn clone(&self) -> DistinctOn
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 moreSource§impl Debug for DistinctOn
impl Debug for DistinctOn
Source§impl<'de> Deserialize<'de> for DistinctOn
impl<'de> Deserialize<'de> for DistinctOn
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for DistinctOn
impl PartialEq for DistinctOn
Source§impl Serialize for DistinctOn
impl Serialize for DistinctOn
impl Eq for DistinctOn
impl StructuralPartialEq for DistinctOn
Auto Trait Implementations§
impl Freeze for DistinctOn
impl RefUnwindSafe for DistinctOn
impl Send for DistinctOn
impl Sync for DistinctOn
impl Unpin for DistinctOn
impl UnwindSafe for DistinctOn
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