42 #ifndef QSQLNULLDRIVER_P_H 43 #define QSQLNULLDRIVER_P_H 56 #include "QtCore/qvariant.h" 57 #include "QtSql/qsqldriver.h" 58 #include "QtSql/qsqlerror.h" 59 #include "QtSql/qsqlresult.h" 72 inline bool fetch(
int) {
return false; }
75 inline bool isNull(
int) {
return false; }
76 inline int size() {
return -1; }
86 inline bool exec() {
return false; }
114 #endif // QSQLNULLDRIVER_P_H The QVariant class acts like a union for the most common Qt data types.
The QSqlError class provides SQL database error information.
void bindValue(int, const QVariant &, QSql::ParamType)
Binds the value val of parameter type paramType to position index in the current record (row)...
#define QT_END_NAMESPACE
This macro expands to.
bool fetchLast()
Positions the result to the last record (last row) in the result.
DriverFeature
This enum contains a list of features a driver might support.
void setLastError(const QSqlError &)
This function is provided for derived classes to set the last error to error.
void setOpenError(bool)
This function sets the open error state of the database to error.
bool isNull(int)
Returns true if the field at position index in the current row is null; otherwise returns false...
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
The QSqlDriver class is an abstract base class for accessing specific SQL databases.
The QString class provides a Unicode character string.
void setAt(int)
This function is provided for derived classes to set the internal (zero-based) row position to index...
void bindValue(const QString &, const QVariant &, QSql::ParamType)
Binds the value val of parameter type paramType to the placeholder name in the current record (row)...
void setLastError(const QSqlError &)
This function is used to set the value of the last error, error, that occurred on the database...
virtual void setLastError(const QSqlError &e)
This function is provided for derived classes to set the last error to error.
bool hasFeature(DriverFeature) const
Returns true if the driver supports feature feature; otherwise returns false.
bool fetchFirst()
Positions the result to the first record (row 0) in the result.
void setForwardOnly(bool)
Sets forward only mode to forward.
QVariant data(int)
Returns the data for field index in the current row as a QVariant.
#define QT_BEGIN_NAMESPACE
This macro expands to.
bool fetch(int)
Positions the result to an arbitrary (zero-based) row index.
bool exec()
Executes the query, returning true if successful; otherwise returns false.
void close()
Derived classes must reimplement this pure virtual function in order to close the database connection...
void setActive(bool)
This function is provided for derived classes to set the internal active state to active...
void setQuery(const QString &)
Sets the current query for the result to query.
void setOpen(bool)
This function sets the open state of the database to open.
void setSelect(bool)
This function is provided for derived classes to indicate whether or not the current statement is a S...
QSqlNullResult(const QSqlDriver *d)
bool savePrepare(const QString &)
Prepares the given query, using the underlying database functionality where possible.
bool open(const QString &, const QString &, const QString &, const QString &, int, const QString &)
Derived classes must reimplement this pure virtual function to open a database connection on database...
virtual void setLastError(const QSqlError &e)
This function is used to set the value of the last error, error, that occurred on the database...
bool reset(const QString &)
Sets the result to use the SQL statement query for subsequent data retrieval.
int size()
Returns the size of the SELECT result, or -1 if it cannot be determined or if the query is not a SELE...
QSqlResult * createResult() const
Creates an empty SQL result on the database.
The QSqlResult class provides an abstract interface for accessing data from specific SQL databases...
int numRowsAffected()
Returns the number of rows affected by the last query executed, or -1 if it cannot be determined or i...
bool prepare(const QString &)
Prepares the given query for execution; the query will normally use placeholders so that it can be ex...