[−][src]Struct qldb::QueryBuilder
Represents the query being built. It allows to add parameters and to execute the query.
Implementations
impl QueryBuilder[src]
pub fn param<P: Into<IonValue> + Clone>(&mut self, param: P) -> &mut Self[src]
Adds a param to the query. Params in PartiQL are deoned by
the character ?. For example, the query:
SELECT * FROM Autos WHERE id = ? AND model = ?
will need 2 calls to this method. The first will refer to
the first ? and the second to the second ?.
pub async fn execute<'_>(&'_ mut self) -> QLDBResult<Vec<IonValue>>[src]
Executes the query in QLDBwith the parameter provided by
the param method. It will return a Vector of Ion Values,
one for each document returned.
pub async fn count<'_>(&'_ mut self) -> QLDBResult<i64>[src]
Sends a query to QLDB that returns a count. Keep in mind that there isn't any filter to fail is another kind of statement is given.
Be careful with COUNT statements as they "block" the whole table and other transactions affecting the same table will return an OCC error when committed.
If you want to make a simple count, it is better to use the count method from Client::count
Trait Implementations
impl Clone for QueryBuilder[src]
pub fn clone(&self) -> QueryBuilder[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
Auto Trait Implementations
impl !RefUnwindSafe for QueryBuilder[src]
impl Send for QueryBuilder[src]
impl Sync for QueryBuilder[src]
impl Unpin for QueryBuilder[src]
impl !UnwindSafe for QueryBuilder[src]
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,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[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> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
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.
pub 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>,