![]() |
Fledge
An open source edge computing platform for industrial users
|
Storage layer query container. More...
#include <query.h>
Public Member Functions | |
| Query (Where *where) | |
| Construct a query with a simple where clause. More... | |
| Query (Aggregate *aggreate, Where *where) | |
| Construct a query with a where clause and aggregate response. More... | |
| Query (Timebucket *timebucket, Where *where) | |
| Construct a timebucket query with a simple where clause. More... | |
| Query (Timebucket *timebucket, Where *where, unsigned int limit) | |
| Construct a timebucket query with a simple where clause and a limit on the rows to return. More... | |
| Query (Returns *returns) | |
| Construct a simple query to return a certain column from a table. More... | |
| Query (std::vector< Returns * > returns) | |
| Construct a simple query to return certain columns from a table. More... | |
| Query (std::vector< Returns * > returns, Where *where) | |
| Construct a query with a fixed set of returned values and a simple where clause. More... | |
| Query (std::vector< Returns * > returns, Where *where, unsigned int limit) | |
| Construct a query with a fixed set of returned values and a simple where clause and return a limited set of rows. More... | |
| ~Query () | |
| Destructor for a query object. | |
| void | aggregate (Aggregate *aggegate) |
| Add a aggregate operation to an existing query object. More... | |
| void | group (const std::string &column) |
| Add a group operation to a query. More... | |
| void | sort (Sort *sort) |
| Add a sort operation to an existing query. More... | |
| void | limit (unsigned int limit) |
| Limit the numebr of rows returned by the query. More... | |
| void | timebucket (Timebucket *) |
| Add a timebucket operation to an existing query. More... | |
| void | returns (Returns *) |
| Limit the query to return just a single column. More... | |
| void | returns (std::vector< Returns * >) |
| Limit the columns returned by the query. More... | |
| void | distinct () |
| Add a distinct value modifier to the query. | |
| void | join (Join *join) |
| Add a join clause to a query. More... | |
| const std::string | toJSON () const |
| Return the JSON payload for a where clause. | |
Storage layer query container.
| Query::Query | ( | Where * | where | ) |
Construct a query with a simple where clause.
| where | A pointer to the where condition |
Construct a query with a where clause and aggregate response.
| aggregate | A ppointer to the aggregate operation to perform |
| where | A pointer to the where condition |
| Query::Query | ( | Timebucket * | timebucket, |
| Where * | where | ||
| ) |
Construct a timebucket query with a simple where clause.
| timebuck | A pointer to the timebucket definition |
| where | A pointer to the where condition |
| Query::Query | ( | Timebucket * | timebucket, |
| Where * | where, | ||
| unsigned int | limit | ||
| ) |
Construct a timebucket query with a simple where clause and a limit on the rows to return.
| timebuck | A pointer to the timebucket definition |
| where | A pointer to the where condition |
| limit | The number of rows to return |
| Query::Query | ( | Returns * | returns | ) |
Construct a simple query to return a certain column from a table.
| returns | The rows to return |
| Query::Query | ( | std::vector< Returns * > | returns | ) |
Construct a simple query to return certain columns from a table.
| returns | The rows to return |
Construct a query with a fixed set of returned values and a simple where clause.
@params returns The set of rows to return @params where The where clause
Construct a query with a fixed set of returned values and a simple where clause and return a limited set of rows.
@params returns The set of rows to return @params where The where clause
| limit | The numebr of rows to return |
| void Query::aggregate | ( | Aggregate * | aggregate | ) |
Add a aggregate operation to an existing query object.
| aggregate | The aggregate operation to add |
| void Query::group | ( | const std::string & | column | ) |
Add a group operation to a query.
| column | The column to group by |
| void Query::join | ( | Join * | join | ) |
Add a join clause to a query.
| join | A pointer to a Join onject |
| void Query::limit | ( | unsigned int | limit | ) |
Limit the numebr of rows returned by the query.
| limit | The number of rows to limit the return to |
| void Query::returns | ( | Returns * | returns | ) |
Limit the query to return just a single column.
| returns | The column to return |
| void Query::returns | ( | std::vector< Returns * > | returns | ) |
Limit the columns returned by the query.
| returns | The columns to return |
| void Query::sort | ( | Sort * | sort | ) |
Add a sort operation to an existing query.
| sort | The sort operation to add |
| void Query::timebucket | ( | Timebucket * | timebucket | ) |
Add a timebucket operation to an existing query.
| timebucket | The timebucket operation to add to the query |