pub struct JoinChain { /* private fields */ }Expand description
A join under construction.
From https://www.sqlite.org/syntax/join-clause.html, the join-constraint
— ON expr or USING (cols) — is a production of its own, applied after
whichever join-operator was used. So cross_join takes on and using
too, which is the point of a CROSS JOIN in SQLite: it is an inner join that
additionally forbids the planner from reordering the two tables. PostgreSQL’s
CROSS JOIN admits no condition at all and correspondingly has a narrower
chain type; SQLite needs no such split.
NATURAL excludes both; nothing enforces that here, because the caller picks
one method and the grammar is what says so.
Implementations§
Source§impl JoinChain
impl JoinChain
Sourcepub fn as_(self, alias: impl Into<Cow<'static, str>>) -> JoinChain
pub fn as_(self, alias: impl Into<Cow<'static, str>>) -> JoinChain
AS "alias" on the joined table.
Sourcepub fn indexed_by(self, name: impl Into<Cow<'static, str>>) -> JoinChain
pub fn indexed_by(self, name: impl Into<Cow<'static, str>>) -> JoinChain
INDEXED BY "name" on the joined table.
Sourcepub fn not_indexed(self) -> JoinChain
pub fn not_indexed(self) -> JoinChain
NOT INDEXED on the joined table.
Sourcepub fn natural(self) -> JoinChain
pub fn natural(self) -> JoinChain
NATURAL <kind> JOIN — derive the join columns from the two items’ names.
Sourcepub fn on(self, condition: impl IntoExpr) -> JoinChain
pub fn on(self, condition: impl IntoExpr) -> JoinChain
ON condition. Several conditions are AND-joined.