[−][src]Struct orma::JoinBuilder
Implementations
impl<'a, A> JoinBuilder<'a, A> where
A: DbData,
[src]
A: DbData,
pub fn new(source: &'a A) -> Self
[src]
Defines the source DbEntity of the DbJoin
pub fn with_target(self, target_table: &'a str) -> Self
[src]
Provides the name of the table where DbJoin items are mapped to
pub fn with_source_fk(self, source_fk: &'a str) -> Self
[src]
The name of the source foreign key in the items table when you want to represents a simple join ( 1 to n )
pub fn with_join_table(
self,
join_table: &'a str,
source_fk: &'a str,
items_fk: &'a str
) -> Self
[src]
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
pub fn with_sorting(self, sorting: &'a [&'a str]) -> Self
[src]
DbJoin sorting attribute used to provide a sorting method on data fetching.
vec!["data->>'first_name'", "data->>'last_name' DESC"];
pub fn build(&self) -> Result<DbJoin, DbError>
[src]
Creates the DbJoin object and fetches the data
Auto Trait Implementations
impl<'a, A> RefUnwindSafe for JoinBuilder<'a, A> where
A: RefUnwindSafe,
A: RefUnwindSafe,
impl<'a, A> Send for JoinBuilder<'a, A> where
A: Sync,
A: Sync,
impl<'a, A> Sync for JoinBuilder<'a, A> where
A: Sync,
A: Sync,
impl<'a, A> Unpin for JoinBuilder<'a, A>
impl<'a, A> UnwindSafe for JoinBuilder<'a, A> where
A: RefUnwindSafe,
A: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,