pub struct Builder { /* private fields */ }Expand description
sqlx::QueryBuilder’s job, over Value rather than one driver.
The paged listings build two of these per query — the page and its
COUNT(*) — sharing one push_predicates, so a filter applied to only one
cannot report a total the rows disagree with. See crate::query.
Implementations§
Source§impl Builder
impl Builder
Sourcepub fn new(dialect: Dialect, sql: impl Into<String>) -> Self
pub fn new(dialect: Dialect, sql: impl Into<String>) -> Self
Starts a builder from a leading fragment.
The dialect comes in here rather than at build, because a predicate
may need it — see Dialect::json_array_source.
Sourcepub fn dialect(&self) -> Dialect
pub fn dialect(&self) -> Dialect
Which dialect the fragments pushed onto this must be written for.
Sourcepub fn push(&mut self, sql: impl AsRef<str>) -> &mut Self
pub fn push(&mut self, sql: impl AsRef<str>) -> &mut Self
Appends SQL verbatim. Never reached by a value from outside.
Sourcepub fn push_bind(&mut self, value: impl Bind) -> &mut Self
pub fn push_bind(&mut self, value: impl Bind) -> &mut Self
Appends a ? marker and the value behind it, so a filter is compared
and never executed.
Auto Trait Implementations§
impl Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnsafeUnpin for Builder
impl UnwindSafe for Builder
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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