MySQL Connector/C++
MySQL connector library for C and C++ applications
Public Member Functions | List of all members
CollectionFind Class Reference

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. More...
 
template<typename... Expr>
Operation & fields (Expr... proj)
 Specify a projection for the documents returned by this operation. More...
 
Operation & groupBy (Expr... group_by_spec)
 Specify grouping of items in a query result. More...
 
Operation & having (const string &having_spec)
 Specify filter over grouped results of a query. More...
 

Detailed Description

An operation which returns all or selected documents from a collection.

Constructor & Destructor Documentation

◆ CollectionFind()

CollectionFind ( Collection coll,
const string expr 
)
inline

Create an operation which returns selected documents from the given collection.

Documents to be returned are specified by the given Boolean expression.

Member Function Documentation

◆ fields()

Operation & fields ( Expr...  proj)
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).

◆ groupBy()

Operation & groupBy ( Expr...  group_by_spec)
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.

◆ having()

Operation & having ( const string having_spec)
inlineinherited

Specify filter over grouped results of a query.

The argument is a Boolean expression which can use aggregation functions.


The documentation for this class was generated from the following file: