pub struct JoinBuilder<'a, A>where
A: DbData,{ /* private fields */ }Implementations§
Source§impl<'a, A> JoinBuilder<'a, A>where
A: DbData,
impl<'a, A> JoinBuilder<'a, A>where
A: DbData,
Sourcepub fn with_target(self, target_table: &'a str) -> Self
pub fn with_target(self, target_table: &'a str) -> Self
Provides the name of the table where DbJoin items are mapped to
Sourcepub fn with_source_fk(self, source_fk: &'a str) -> Self
pub fn with_source_fk(self, source_fk: &'a str) -> Self
The name of the source foreign key in the items table when you want to represents a simple join ( 1 to n )
Sourcepub fn with_join_table(
self,
join_table: &'a str,
source_fk: &'a str,
items_fk: &'a str,
) -> Self
pub fn with_join_table( self, join_table: &'a str, source_fk: &'a str, items_fk: &'a str, ) -> Self
If you want to map a m2n join, you provide the name of the db table with name of the source foreign key and the foreign key of the items table
Sourcepub fn with_sorting(self, sorting: &'a [&'a str]) -> Self
pub fn with_sorting(self, sorting: &'a [&'a str]) -> Self
DbJoin sorting attribute used to provide a sorting method on data fetching.
vec!["data->>'first_name'", "data->>'last_name' DESC"];Auto Trait Implementations§
impl<'a, A> Freeze for JoinBuilder<'a, A>
impl<'a, A> RefUnwindSafe for JoinBuilder<'a, A>where
A: RefUnwindSafe,
impl<'a, A> Send for JoinBuilder<'a, A>where
A: Sync,
impl<'a, A> Sync for JoinBuilder<'a, A>where
A: Sync,
impl<'a, A> Unpin for JoinBuilder<'a, A>
impl<'a, A> UnsafeUnpin for JoinBuilder<'a, A>
impl<'a, A> UnwindSafe for JoinBuilder<'a, A>where
A: RefUnwindSafe,
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