Hi,
Today you cannot execute "
complex query" with QxOrm (version 1.1.3).
You have to use directly QtSql module if QxOrm cannot resolve your problem, or execute more than 1 query.
However, QxOrm provides a mechanism to create "
simple query" : the class
qx::QxSqlQuery.
You can use the class
qx::QxSqlQuery with :
- qx::dao::fetch_by_query(...)
- qx::dao::delete_by_query(...)
- qx::dao::count(...)
Here a example from the tutorial :
- Code: Select all
// Create a query to fetch only female author
qx::QxSqlQuery query("WHERE author.sex = :sex");
query.bind(":sex", author::female);
list_author list_of_female_author;
daoError = qx::dao::fetch_by_query(query, list_of_female_author);