MySQL Connector/C++
MySQL connector library for C and C++ applications
|
An operation which returns all or selected documents from a collection. More...
Public Member Functions | |
CollectionFind (Collection &coll) | |
Create an operation which returns all documents from the given collection. | |
CollectionFind (Collection &coll, const string &expr) | |
Create an operation which returns selected documents from the given collection. | |
template<typename... Expr> | |
Operation & | fields (Expr... proj) |
Specify a projection for the documents returned by this operation. | |
Operation & | groupBy (Expr... group_by_spec) |
Specify grouping of items in a query result. | |
Operation & | having (const string &having_spec) |
Specify filter over grouped results of a query. | |
Operation & | sort (Type... spec) |
Specify ordering of documents in a query results. | |
Operation & | limit (unsigned items) |
Limit the operation to the given number of items (rows or documents). | |
Operation & | offset (unsigned rows) |
Skip the given number of items (rows or documents) before starting to perform the operation. | |
BindOperation & | bind (const string ¶meter, const Value &val) |
Bind parameter with given name to the given value. | |
Operation & | bind (const Map &args) |
Bind parameters to values given by a map from parameter names to their values. | |
Operation & | lockShared (LockContention contention=LockContention::DEFAULT) |
Set a shared mode lock on any rows/documents that are read. | |
Operation & | lockExclusive (LockContention contention=LockContention::DEFAULT) |
Set an exclusive mode lock on any rows/documents that are read. | |
virtual DocResult | execute () |
Execute given operation and return its result. | |
virtual DocResult | execute () |
Execute given operation and return its result. | |
virtual DocResult | execute () |
Execute given operation and return its result. | |
An operation which returns all or selected documents from a collection.
|
inline |
Create an operation which returns selected documents from the given collection.
Documents to be returned are specified by the given Boolean expression.
|
inline |
Specify a projection for the documents returned by this operation.
Projection is either a single document expression given by expr(<string>)
or a list (or collection) of strings of the form "<expression> AS <path>"
. In the latter case each <expression>
is evaluated and <path>
specifies where to put the value of the expression in the resulting document (see CollectionModify
for more information about document paths).
|
inlineinherited |
Specify grouping of items in a query result.
Arguments are a one or more expressions. Documents/rows for which expressions evaluate to the same value are grouped together.
|
inlineinherited |
Specify filter over grouped results of a query.
The argument is a Boolean expression which can use aggregation functions.
|
inlineinherited |
Specify ordering of documents in a query results.
Arguments are one or more strings of the form "<expr> <dir>"
where <expr>
gives the value to sort on and <dir>
is a sorting direction ASC
or DESC
.
|
inlineinherited |
Bind parameter with given name to the given value.
A statement or query can be executed only if all named parameters used by it are bound to values.
|
inlineinherited |
Set a shared mode lock on any rows/documents that are read.
Other sessions can read, but not modify locked rows/documents.
|
inlineinherited |
Set an exclusive mode lock on any rows/documents that are read.
Other sessions are blocked from modifying, locking, or reading the data in certain transaction isolation levels. The lock is released when the transaction is committed or rolled back.