Qx v0.7
Qt Extensions Library
|
SqlQuery is a base class from which all query types derive. More...
#include <qx/sql/qx-sqlquery.h>
Public Member Functions | |
void | bindValue (const QString &placeholder, const QVariant &val) |
SqlDatabase * | database () |
const SqlDatabase * | database () const |
bool | hasDatabase () const |
QString | string () const |
This class defines the common interface for all query types and is never instantiated directly.
void Qx::SqlQuery::bindValue | ( | const QString & | placeholder, |
const QVariant & | val ) |
Binds the value val to placeholder placeholder in the query.
Unlike QSqlQuery, values can be bound before the query is completely formed.
SqlDatabase * Qx::SqlQuery::database | ( | ) |
Returns the database associated with the string.
const SqlDatabase * Qx::SqlQuery::database | ( | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool Qx::SqlQuery::hasDatabase | ( | ) | const |
Returns true
if the query has an associated database, and therefore can be executed; otherwise, returns false
.
QString Qx::SqlQuery::string | ( | ) | const |
Returns the current query string.