Struct easy_sqlx_core::sql::builder::select_builder::SelectBuilder
source · pub struct SelectBuilder<'a> { /* private fields */ }
Implementations§
source§impl<'a> SelectBuilder<'a>
impl<'a> SelectBuilder<'a>
pub fn new(table: TableSchema) -> Self
pub fn with_default_schema(self, schema: &'a str) -> Self
pub fn order_by(self, item: Order) -> Self
Trait Implementations§
source§impl<'a> Debug for SelectBuilder<'a>
impl<'a> Debug for SelectBuilder<'a>
source§impl<'a> QueryBuilder<'a> for SelectBuilder<'a>
impl<'a> QueryBuilder<'a> for SelectBuilder<'a>
type DB = Postgres
source§async fn optional<'e, 'c: 'e, E, O>(
self,
executor: E,
) -> Result<Option<O>, Error>
async fn optional<'e, 'c: 'e, E, O>( self, executor: E, ) -> Result<Option<O>, Error>
获取一条记录,如果不存在返回 None
source§async fn page<'e, 'c: 'e, E, O>(
&self,
executor: E,
page: &PageRequest,
) -> Result<PageResult<O>, Error>
async fn page<'e, 'c: 'e, E, O>( &self, executor: E, page: &PageRequest, ) -> Result<PageResult<O>, Error>
分页查询
source§async fn optional_scalar<'q, 'c, E, O>(
&self,
executor: E,
field: &'q str,
) -> Result<Option<O>, Error>
async fn optional_scalar<'q, 'c, E, O>( &self, executor: E, field: &'q str, ) -> Result<Option<O>, Error>
获取一个可选标量,如果不存在返回 None
source§async fn all_scalars<'q, 'c, E, O>(
&self,
executor: E,
field: &'q str,
) -> Result<Vec<O>, Error>
async fn all_scalars<'q, 'c, E, O>( &self, executor: E, field: &'q str, ) -> Result<Vec<O>, Error>
获取全部标量
source§impl<'a> WhereAppend<Condition> for SelectBuilder<'a>
impl<'a> WhereAppend<Condition> for SelectBuilder<'a>
Auto Trait Implementations§
impl<'a> Freeze for SelectBuilder<'a>
impl<'a> RefUnwindSafe for SelectBuilder<'a>
impl<'a> Send for SelectBuilder<'a>
impl<'a> Sync for SelectBuilder<'a>
impl<'a> Unpin for SelectBuilder<'a>
impl<'a> UnwindSafe for SelectBuilder<'a>
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more