- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Protected Types | Protected Member Functions | Friends

# QSqlResult Class Reference

Search for all occurrences

## Detailed Description

Definition at line 63 of file qsqlresult.h.

`#include <qsqlresult.h>`

Inheritance diagram for QSqlResult:
[legend]

List of all members.

## Public Member Functions
virtual | ~QSqlResult ()
virtual QVariant | handle () const
## Protected Types
enum | BindingSyntax { PositionalBinding, NamedBinding }
enum | VirtualHookOperation { BatchOperation, DetachFromResultSet, SetNumericalPrecision, NextResult }
## Protected Member Functions
| QSqlResult (const QSqlDriver *db)
int | at () const
QString | lastQuery () const
QSqlError | lastError () const
bool | isValid () const
bool | isActive () const
bool | isSelect () const
bool | isForwardOnly () const
const QSqlDriver * | driver () const
virtual void | setAt (int at)
virtual void | setActive (bool a)
virtual void | setLastError (const QSqlError &e)
virtual void | setQuery (const QString &query)
virtual void | setSelect (bool s)
virtual void | setForwardOnly (bool forward)
virtual bool | exec ()
virtual bool | prepare (const QString &query)
virtual bool | savePrepare (const QString &sqlquery)
virtual void | bindValue (int pos, const QVariant &val, QSql::ParamType type)
virtual void | bindValue (const QString &placeholder, const QVariant &val, QSql::ParamType type)
void | addBindValue (const QVariant &val, QSql::ParamType type)
QVariant | boundValue (const QString &placeholder) const
QVariant | boundValue (int pos) const
QSql::ParamType | bindValueType (const QString &placeholder) const
QSql::ParamType | bindValueType (int pos) const
int | boundValueCount () const
QVector< QVariant > & | boundValues () const
QString | executedQuery () const
QString | boundValueName (int pos) const
void | clear ()
bool | hasOutValues () const
BindingSyntax | bindingSyntax () const
virtual QVariant | data (int i)=0
virtual bool | isNull (int i)=0
virtual bool | reset (const QString &sqlquery)=0
virtual bool | fetch (int i)=0
virtual bool | fetchNext ()
virtual bool | fetchPrevious ()
virtual bool | fetchFirst ()=0
virtual bool | fetchLast ()=0
virtual int | size ()=0
virtual int | numRowsAffected ()=0
virtual QSqlRecord | record () const
virtual QVariant | lastInsertId () const
virtual void | virtual_hook (int id, void *data)
bool | execBatch (bool arrayBind=false)
void | detachFromResultSet ()
void | setNumericalPrecisionPolicy (QSql::NumericalPrecisionPolicy policy)
QSql::NumericalPrecisionPolicy | numericalPrecisionPolicy () const
bool | nextResult ()
## Friends
class | QSqlQuery
class | QSqlTableModelPrivate
class | QSqlResultPrivate

## Member Enumeration Documentation

enum BindingSyntax `[protected]`

Search for all occurrences

Enumerator:

  PositionalBinding | Search for all occurrences
  NamedBinding | Search for all occurrences

Definition at line 74 of file qsqlresult.h.

                           {
            PositionalBinding,
            NamedBinding
    #ifdef QT3_SUPPORT
            , BindByPosition = PositionalBinding,
            BindByName = NamedBinding
    #endif
        };

enum VirtualHookOperation `[protected]`

Search for all occurrences

Enumerator:

  BatchOperation | Search for all occurrences
  DetachFromResultSet | Search for all occurrences
  SetNumericalPrecision | Search for all occurrences
  NextResult | Search for all occurrences

Definition at line 133 of file qsqlresult.h.

    { BatchOperation, DetachFromResultSet, SetNumericalPrecision, NextResult };

## Constructor & Destructor Documentation

virtual ~QSqlResult | ( |  | ) | `[virtual]`

QSqlResult | ( | const QSqlDriver * | db | ) | `[explicit, protected]`

## Member Function Documentation

virtual QVariant handle | ( |  | ) | const `[virtual]`

Search for all occurrences

Reimplemented in QDB2Result, QMYSQLResult, QODBCResult, and QPSQLResult.

int at | ( |  | ) | const `[protected]`

Search for all occurrences

QString lastQuery | ( |  | ) | const `[protected]`

Search for all occurrences

QSqlError lastError | ( |  | ) | const `[protected]`

Search for all occurrences

bool isValid | ( |  | ) | const `[protected]`

Search for all occurrences

bool isActive | ( |  | ) | const `[protected]`

Search for all occurrences

bool isSelect | ( |  | ) | const `[protected]`

Search for all occurrences

bool isForwardOnly | ( |  | ) | const `[protected]`

Search for all occurrences

const QSqlDriver* driver | ( |  | ) | const `[protected]`

Search for all occurrences

virtual void setAt | ( | int | at | ) | `[protected, virtual]`

Search for all occurrences

virtual void setActive | ( | bool | a | ) | `[protected, virtual]`

Search for all occurrences

virtual void setLastError | ( | const QSqlError & | e | ) | `[protected, virtual]`

Search for all occurrences

virtual void setQuery | ( | const QString & | query | ) | `[protected, virtual]`

Search for all occurrences

virtual void setSelect | ( | bool | s | ) | `[protected, virtual]`

Search for all occurrences

virtual void setForwardOnly | ( | bool | forward | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented in QODBCResult.

virtual bool exec | ( |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented in QDB2Result, QODBCResult, and QPSQLResult.

virtual bool prepare | ( | const QString & | query | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented in QDB2Result, QODBCResult, and QPSQLResult.

virtual bool savePrepare | ( | const QString & | sqlquery | ) | `[protected, virtual]`

Search for all occurrences

virtual void bindValue | ( | int | pos,
|  | const QVariant & | val,
|  | QSql::ParamType | type
| ) |  | `[protected, virtual]`

Search for all occurrences

virtual void bindValue | ( | const QString & | placeholder,
|  | const QVariant & | val,
|  | QSql::ParamType | type
| ) |  | `[protected, virtual]`

Search for all occurrences

void addBindValue | ( | const QVariant & | val,
|  | QSql::ParamType | type
| ) |  | `[protected]`

Search for all occurrences

QVariant boundValue | ( | const QString & | placeholder | ) | const `[protected]`

Search for all occurrences

QVariant boundValue | ( | int | pos | ) | const `[protected]`

Search for all occurrences

QSql::ParamType bindValueType | ( | const QString & | placeholder | ) | const `[protected]`

Search for all occurrences

QSql::ParamType bindValueType | ( | int | pos | ) | const `[protected]`

Search for all occurrences

int boundValueCount | ( |  | ) | const `[protected]`

Search for all occurrences

QVector<QVariant>& boundValues | ( |  | ) | const `[protected]`

Search for all occurrences

QString executedQuery | ( |  | ) | const `[protected]`

Search for all occurrences

QString boundValueName | ( | int | pos | ) | const `[protected]`

Search for all occurrences

void clear | ( |  | ) | `[protected]`

Search for all occurrences

bool hasOutValues | ( |  | ) | const `[protected]`

Search for all occurrences

BindingSyntax bindingSyntax | ( |  | ) | const `[protected]`

Search for all occurrences

virtual QVariant data | ( | int | i | ) | `[protected, pure virtual]`

Search for all occurrences

Implemented in QDB2Result, QMYSQLResult, QODBCResult, and QPSQLResult.

virtual bool isNull | ( | int | i | ) | `[protected, pure virtual]`

Search for all occurrences

Implemented in QDB2Result, QMYSQLResult, QODBCResult, and QPSQLResult.

virtual bool reset | ( | const QString & | sqlquery | ) | `[protected, pure virtual]`

Search for all occurrences

Implemented in QDB2Result, QMYSQLResult, QODBCResult, and QPSQLResult.

virtual bool fetch | ( | int | i | ) | `[protected, pure virtual]`

Search for all occurrences

Implemented in QDB2Result, QMYSQLResult, QODBCResult, and QPSQLResult.

virtual bool fetchNext | ( |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented in QDB2Result, QMYSQLResult, and QODBCResult.

virtual bool fetchPrevious | ( |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented in QODBCResult.

virtual bool fetchFirst | ( |  | ) | `[protected, pure virtual]`

Search for all occurrences

Implemented in QDB2Result, QMYSQLResult, QODBCResult, and QPSQLResult.

virtual bool fetchLast | ( |  | ) | `[protected, pure virtual]`

Search for all occurrences

Implemented in QDB2Result, QMYSQLResult, QODBCResult, and QPSQLResult.

virtual int size | ( |  | ) | `[protected, pure virtual]`

Search for all occurrences

Implemented in QDB2Result, QMYSQLResult, QODBCResult, and QPSQLResult.

virtual int numRowsAffected | ( |  | ) | `[protected, pure virtual]`

Search for all occurrences

Implemented in QDB2Result, QMYSQLResult, QODBCResult, and QPSQLResult.

virtual QSqlRecord record | ( |  | ) | const `[protected, virtual]`

Search for all occurrences

Reimplemented in QDB2Result, QMYSQLResult, QODBCResult, and QPSQLResult.

virtual QVariant lastInsertId | ( |  | ) | const `[protected, virtual]`

Search for all occurrences

Reimplemented in QMYSQLResult, and QPSQLResult.

virtual void virtual_hook | ( | int | id,
|  | void * | data
| ) |  | `[protected, virtual]`

Search for all occurrences

Reimplemented in QDB2Result, QMYSQLResult, QODBCResult, and QPSQLResult.

bool execBatch | ( | bool | arrayBind = `false` | ) | `[protected]`

Search for all occurrences

void detachFromResultSet | ( |  | ) | `[protected]`

Search for all occurrences

void setNumericalPrecisionPolicy | ( | QSql::NumericalPrecisionPolicy | policy | ) | `[protected]`

Search for all occurrences

QSql::NumericalPrecisionPolicy numericalPrecisionPolicy | ( |  | ) | const `[protected]`

Search for all occurrences

bool nextResult | ( |  | ) | `[protected]`

Search for all occurrences

Reimplemented in QDB2Result, QMYSQLResult, and QODBCResult.

## Friends And Related Function Documentation

friend class QSqlQuery `[friend]`

Search for all occurrences

Definition at line 65 of file qsqlresult.h.

friend class QSqlTableModelPrivate `[friend]`

Search for all occurrences

Definition at line 66 of file qsqlresult.h.

friend class QSqlResultPrivate `[friend]`

Search for all occurrences

Definition at line 67 of file qsqlresult.h.

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

- QtSql/qsqlresult.h

QSqlResult QSqlResult QSqlResult QSqlResult QSqlResult QSqlResult QSqlResult QSqlResult QSqlResult QSqlResult
QSqlResult QSqlResult QSqlResult QSqlResult QSqlResult QSqlResult QSqlResult QSqlResult QSqlResult QSqlResult