#include <simpleQuery.h>
Public Member Functions | |
SimpleQuery (std::string queryStr="", std::string sortStr="") | |
virtual std::string | getSql (Driver &drv, const Type &type) const |
Returns SQL SELECT statement representing the current query. | |
Static Public Attributes | |
static SimpleQuery | All |
A query retrieving all unordered persistent instances of a particular type. |
SimpleQuery is used to create basic queries which select data only from a single view or table specified by the result type of the query result Result<T>. The result can be ordered and filtered by restricting attribute values of the type. SimpleQuery is used to retrieve instances of one particular type. It represents only the WHERE and ORDER BY parts of the resulting SQL SELECT statement.
iopc::SimpleQuery::SimpleQuery | ( | std::string | queryStr = "" , |
|
std::string | sortStr = "" | |||
) | [inline] |
queryStr | Query filter which restricts attribute values of the queried type. May be empty. Example: "::Person::age > 30" | |
sortStr | Describes how the results are ordered. May be empty Example:: "::Person::name ASC" |
Returns SQL SELECT statement representing the current query.
drv | Database driver used to generate the statement | |
type | Type for which to generate the statement. Determines the columns/attributes that the SELECT returns. |
Implements iopc::Query.