Struct arel::statements::group::Group
source · pub struct Group<M: Arel> { /* private fields */ }Implementations§
source§impl<M: Arel> Group<M>
impl<M: Arel> Group<M>
sourcepub fn new<T: AsRef<str>>(columns: Vec<T>) -> Self
pub fn new<T: AsRef<str>>(columns: Vec<T>) -> Self
Examples
use arel::prelude::*;
use arel::statements::group::Group;
#[arel]
struct User {}
impl Arel for User {}
let group = Group::<User>::new(vec!["name", "age"]);
assert_eq!(group.to_sql().unwrap().unwrap().to_sql_string().unwrap(), r#"GROUP BY "user"."name", "user"."age""#);
pub fn new_sql<S: Into<Sql>>(sql: S) -> Self
sourcepub fn new_sqls<S: Into<Sql>>(sqls: Vec<S>) -> Self
pub fn new_sqls<S: Into<Sql>>(sqls: Vec<S>) -> Self
Examples
use arel::prelude::*;
use arel::statements::group::Group;
#[arel]
struct User {}
impl Arel for User {}
let group = Group::<User>::new_sqls(vec!["name", "age"]);
assert_eq!(group.to_sql().unwrap().unwrap().to_sql_string().unwrap(), r#"GROUP BY name, age"#);
Trait Implementations§
Auto Trait Implementations§
impl<M> RefUnwindSafe for Group<M>where
M: RefUnwindSafe,
impl<M> Send for Group<M>
impl<M> Sync for Group<M>where
M: Sync,
impl<M> Unpin for Group<M>where
M: Unpin,
impl<M> UnwindSafe for Group<M>where
M: UnwindSafe,
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