Struct sea_orm::query::SelectTwo [−][src]
pub struct SelectTwo<E, F> where
E: EntityTrait,
F: EntityTrait, { /* fields omitted */ }
Implementations
pub fn into_model<M, N>(self) -> Selector<SelectTwoModel<M, N>> where
M: FromQueryResult,
N: FromQueryResult,
This is supported on crate feature
with-json
only.pub async fn one<'a, C>(
self,
db: &C
) -> Result<Option<(E::Model, Option<F::Model>)>, DbErr> where
C: ConnectionTrait<'a>,
pub async fn all<'a, C>(
self,
db: &C
) -> Result<Vec<(E::Model, Option<F::Model>)>, DbErr> where
C: ConnectionTrait<'a>,
pub async fn stream<'a: 'b, 'b, C>(
self,
db: &'a C
) -> Result<impl Stream<Item = Result<(E::Model, Option<F::Model>), DbErr>> + 'b, DbErr> where
C: ConnectionTrait<'a>,
pub fn paginate<'a, C>(
self,
db: &'a C,
page_size: usize
) -> Paginator<'a, C, SelectTwoModel<E::Model, F::Model>> where
C: ConnectionTrait<'a>,
Trait Implementations
type QueryStatement = SelectStatement
Add an AND WHERE expression Read more
Apply a where condition using the model’s primary key
type QueryStatement = SelectStatement
Add an order_by expression Read more
Add an order_by expression (ascending) Read more
Add an order_by expression (descending) Read more
type QueryStatement = SelectStatement
Clear the selection list
Add a select column Read more
Add a select column with alias Read more
Add a group by column Read more
Add an AND HAVING expression Read more
Join via RelationDef
.
Join via RelationDef
but in reverse direction.
Assume when there exist a relation A to B.
You can reverse join B from A. Read more
Select lock shared
Select lock exclusive
type QueryStatement = SelectStatement
Get a mutable ref to the query builder
Get an immutable ref to the query builder
Take ownership of the query builder
Auto Trait Implementations
impl<E, F> !RefUnwindSafe for SelectTwo<E, F>
impl<E, F> !UnwindSafe for SelectTwo<E, F>
Blanket Implementations
Mutably borrows from an owned value. Read more