[][src]Trait quaint::ast::Joinable

pub trait Joinable<'a> {
    fn on<T>(self, conditions: T) -> JoinData<'a>
    where
        T: Into<ConditionTree<'a>>
; }

An item that can be joined.

Required methods

fn on<T>(self, conditions: T) -> JoinData<'a> where
    T: Into<ConditionTree<'a>>, 

Add the JOIN conditions.

let join_data = "b".on(("b", "id").equals(Column::from(("a", "id"))));
let query = Select::from_table("a").inner_join(join_data);
let (sql, _) = Sqlite::build(query);

assert_eq!(
    "SELECT `a`.* FROM `a` INNER JOIN `b` ON `b`.`id` = `a`.`id`",
    sql,
);
Loading content...

Implementors

impl<'a, U> Joinable<'a> for U where
    U: Into<Table<'a>>, 
[src]

Loading content...