Qx v0.7
Qt Extensions Library
Loading...
Searching...
No Matches
Qx::SqlQuery Class Reference

SqlQuery is a base class from which all query types derive. More...

#include <qx/sql/qx-sqlquery.h>

Inheritance diagram for Qx::SqlQuery:
[legend]

Public Member Functions

void bindValue (const QString &placeholder, const QVariant &val)
 
SqlDatabasedatabase ()
 
const SqlDatabasedatabase () const
 
bool hasDatabase () const
 
QString string () const
 

Detailed Description

This class defines the common interface for all query types and is never instantiated directly.

Member Function Documentation

◆ bindValue()

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.

Note
Due to implementation constraints, ordered bindings are not supported.

◆ database() [1/2]

SqlDatabase * Qx::SqlQuery::database ( )

Returns the database associated with the string.

◆ database() [2/2]

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.

◆ hasDatabase()

bool Qx::SqlQuery::hasDatabase ( ) const

Returns true if the query has an associated database, and therefore can be executed; otherwise, returns false.

◆ string()

QString Qx::SqlQuery::string ( ) const

Returns the current query string.


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