Skip to main content

JoinArg

Trait JoinArg 

Source
pub trait JoinArg<'a, FromTable> {
    type JoinedTable;

    // Required method
    fn into_join_sql(self, join: Join) -> SQL<'a, PostgresValue<'a>>;
}
Expand description

Trait for arguments accepted by .join() and related join methods.

Required Associated Types§

Source

type JoinedTable

Table added to the query scope by this join.

Required Methods§

Source

fn into_join_sql(self, join: Join) -> SQL<'a, PostgresValue<'a>>

Renders the join source and its ON condition.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a, U, C, T> JoinArg<'a, T> for (U, C)
where U: JoinSource<'a>, C: ToSQL<'a, PostgresValue<'a>>,

Tuple (table, condition): explicit ON condition.

Source§

type JoinedTable = <U as JoinSource<'a>>::JoinedTable

Source§

fn into_join_sql(self, join: Join) -> SQL<'a, PostgresValue<'a>>

Implementors§

Source§

impl<'a, U, T> JoinArg<'a, T> for U
where U: PostgresTable<'a> + Joinable<T>, T: SQLTableInfo + Default,

Bare table: derives the ON condition from Joinable::fk_columns().