[−][src]Struct quaint::ast::Union
A builder for a UNION
s over multiple SELECT
statements.
Methods
impl<'a> Union<'a>
[src]
pub fn new(q: Select<'a>) -> Self
[src]
pub fn all(self, q: Select<'a>) -> Self
[src]
Creates a union with previous selection and the given SELECT
statement, allowing duplicates.
let s1 = Select::default().value(1); let s2 = Select::default().value(2); let (sql, params) = Sqlite::build(Union::new(s1).all(s2)); assert_eq!("(SELECT ?) UNION ALL (SELECT ?)", sql); assert_eq!(vec![ ParameterizedValue::from(1), ParameterizedValue::from(2) ], params);
pub fn distinct(self, q: Select<'a>) -> Self
[src]
Creates a union with previous selection and the given SELECT
statement, selecting only distinct values.
let s1 = Select::default().value(1); let s2 = Select::default().value(2); let (sql, params) = Sqlite::build(Union::new(s1).distinct(s2)); assert_eq!("(SELECT ?) UNION (SELECT ?)", sql); assert_eq!(vec![ ParameterizedValue::from(1), ParameterizedValue::from(2) ], params);
Trait Implementations
impl<'a> Clone for Union<'a>
[src]
impl<'a> Debug for Union<'a>
[src]
impl<'a> Default for Union<'a>
[src]
impl<'a> From<Union<'a>> for Query<'a>
[src]
impl<'a> PartialEq<Union<'a>> for Union<'a>
[src]
impl<'a> StructuralPartialEq for Union<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for Union<'a>
impl<'a> Send for Union<'a>
impl<'a> Sync for Union<'a>
impl<'a> Unpin for Union<'a>
impl<'a> UnwindSafe for Union<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,