Struct qldb::QueryBuilder[][src]

pub struct QueryBuilder { /* fields omitted */ }
Expand description

Represents the query being built. It allows to add parameters and to execute the query.

Implementations

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 ?.

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.

This method will automatically load all the pages. It may require to make several HTTP calls to the QLDB Ledger as each Page contains no more than 200 documents.

It consumes the QueryBuilder in the process.

Creates a cursor for this query, allowing to load values page by page. Each page in QLDB contains 200 documents.

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

It consumes the QueryBuilder in the process.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Applies the Compat adapter by value. Read more

Applies the Compat adapter by shared reference. Read more

Applies the Compat adapter by mutable reference. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.