[−][src]Struct orma::DbJoin
This struct is used to create a join between DbEntyty elements and JoinBuilder is used to create a DbJoin instance.
sorting parameter (such as vec!["data->>'first_name'", "data->>'last_name' DESC"]) take effect after a call to reload method.
items can be persisted to db after a call to save_items method.
See JoinBuilder for more info
Fields
sorting: Vec<String>
Used to provide a sorting method on data fetching.
vec!["data->>'first_name'", "data->>'last_name' DESC"];
items: Vec<DbEntity<A>>
Items for this relation over the DbEntity source that has been provided.
Methods
impl<A> DbJoin<A> where
A: DbData + Serialize + DeserializeOwned,
[src]
A: DbData + Serialize + DeserializeOwned,
pub async fn reload<'_, '_>(
&'_ mut self,
conn: &'_ Connection
) -> Result<(), DbError>
[src]
&'_ mut self,
conn: &'_ Connection
) -> Result<(), DbError>
This method reloads items field for the given join using the current sorting field.
pub async fn save_items<'_, '_>(
&'_ self,
conn: &'_ mut Connection
) -> Result<(), DbError>
[src]
&'_ self,
conn: &'_ mut Connection
) -> Result<(), DbError>
This method saves the items for the given join to the DB.
Auto Trait Implementations
impl<A> RefUnwindSafe for DbJoin<A> where
A: RefUnwindSafe,
A: RefUnwindSafe,
impl<A> Send for DbJoin<A> where
A: Send,
A: Send,
impl<A> Sync for DbJoin<A> where
A: Sync,
A: Sync,
impl<A> Unpin for DbJoin<A> where
A: Unpin,
A: Unpin,
impl<A> UnwindSafe for DbJoin<A> where
A: UnwindSafe,
A: UnwindSafe,
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>,