pub struct JoinChain { /* private fields */ }Expand description
A join under construction.
ON and USING are alternatives and 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 columns(
self,
columns: impl IntoIterator<Item = impl Into<Cow<'static, str>>>,
) -> JoinChain
pub fn columns( self, columns: impl IntoIterator<Item = impl Into<Cow<'static, str>>>, ) -> JoinChain
Column aliases on the joined derived table.
Sourcepub fn lateral(self) -> JoinChain
pub fn lateral(self) -> JoinChain
LATERAL on the joined item — what lets a joined derived table see the
columns of the item it is joined to.
Only grammatical in front of a derived table; on a bare table or CTE
name this records a build() error instead, because
JOIN LATERAL `posts` is a syntax error with nothing to mean.
Sourcepub fn partition(
self,
partitions: impl IntoIterator<Item = impl Into<Cow<'static, str>>>,
) -> JoinChain
pub fn partition( self, partitions: impl IntoIterator<Item = impl Into<Cow<'static, str>>>, ) -> JoinChain
PARTITION (…) on the joined table.
Sourcepub fn use_index(
self,
indexes: impl IntoIterator<Item = impl Into<Cow<'static, str>>>,
) -> JoinChain
pub fn use_index( self, indexes: impl IntoIterator<Item = impl Into<Cow<'static, str>>>, ) -> JoinChain
USE INDEX (…) on the joined table.
Sourcepub fn ignore_index(
self,
indexes: impl IntoIterator<Item = impl Into<Cow<'static, str>>>,
) -> JoinChain
pub fn ignore_index( self, indexes: impl IntoIterator<Item = impl Into<Cow<'static, str>>>, ) -> JoinChain
IGNORE INDEX (…) on the joined table.
Sourcepub fn force_index(
self,
indexes: impl IntoIterator<Item = impl Into<Cow<'static, str>>>,
) -> JoinChain
pub fn force_index( self, indexes: impl IntoIterator<Item = impl Into<Cow<'static, str>>>, ) -> JoinChain
FORCE INDEX (…) on the joined table.
Sourcepub fn for_order_by(self) -> JoinChain
pub fn for_order_by(self) -> JoinChain
FOR ORDER BY on the hint just added.
Sourcepub fn for_group_by(self) -> JoinChain
pub fn for_group_by(self) -> JoinChain
FOR GROUP BY on the hint just added.
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.