pub struct JoinBuilder { /* private fields */ }Expand description
The conditions of one join: column comparisons (on) and conditions
with bindings (where, raw SQL).
PHP: Utopia\Query\Builder\JoinBuilder.
Implementations§
Source§impl JoinBuilder
impl JoinBuilder
Sourcepub fn on(
&mut self,
left: &str,
right: &str,
operator: &str,
) -> Result<&mut Self>
pub fn on( &mut self, left: &str, right: &str, operator: &str, ) -> Result<&mut Self>
left operator right (columns; PHP’s default operator is =).
PHP: on().
Sourcepub fn on_raw(
&mut self,
expression: impl Into<String>,
bindings: impl IntoValues,
) -> &mut Self
pub fn on_raw( &mut self, expression: impl Into<String>, bindings: impl IntoValues, ) -> &mut Self
A raw ON condition with its bindings, enclosed in parentheses like
where_raw().
PHP: onRaw().
Sourcepub fn where_(
&mut self,
column: &str,
operator: &str,
value: impl IntoValue,
) -> Result<&mut Self>
pub fn where_( &mut self, column: &str, operator: &str, value: impl IntoValue, ) -> Result<&mut Self>
column operator ? with value bound.
PHP: where().
Sourcepub fn where_raw(
&mut self,
expression: impl Into<String>,
bindings: impl IntoValues,
) -> &mut Self
pub fn where_raw( &mut self, expression: impl Into<String>, bindings: impl IntoValues, ) -> &mut Self
A raw condition for the join’s ON clause, enclosed in parentheses:
the ON conditions are joined with AND, so an OR inside a bare
a = b OR 1 = 1 would escape the other conditions, including those a
join-filter hook adds.
PHP: whereRaw().
Sourcepub fn push(
&mut self,
ons: impl IntoIterator<Item = JoinOn>,
wheres: impl IntoIterator<Item = Condition>,
) -> &mut Self
pub fn push( &mut self, ons: impl IntoIterator<Item = JoinOn>, wheres: impl IntoIterator<Item = Condition>, ) -> &mut Self
Adds a comparison and a condition as they are, for a join whose conditions were
checked where they were written (PHP’s JoinBuilder).
Trait Implementations§
Source§impl Clone for JoinBuilder
impl Clone for JoinBuilder
Source§impl Debug for JoinBuilder
impl Debug for JoinBuilder
Source§impl Default for JoinBuilder
impl Default for JoinBuilder
Source§impl PartialEq for JoinBuilder
impl PartialEq for JoinBuilder
impl StructuralPartialEq for JoinBuilder
Auto Trait Implementations§
impl Forget for JoinBuilder
impl Freeze for JoinBuilder
impl Move for JoinBuilder
impl RefUnwindSafe for JoinBuilderwhere
Atomic<*mut ()>: RefUnwindSafe,
Atomic<usize>: RefUnwindSafe,
OnceLock<Index>: RefUnwindSafe,
Atomic<u8>: RefUnwindSafe,
impl Send for JoinBuilder
impl Sync for JoinBuilder
impl Unpin for JoinBuilder
impl UnsafeUnpin for JoinBuilderwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<JoinOn>: UnsafeUnpin,
PhantomData<Condition>: UnsafeUnpin,
impl UnwindSafe for JoinBuilderwhere
RawVecInner: UnwindSafe,
&'static [u8]: UnwindSafe,
*const u8: UnwindSafe,
Align8<*mut ()>: UnwindSafe,
&'static Vtable: UnwindSafe,
Arc<Repr<Object>>: UnwindSafe,
BoxRaw<Query>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more