45 #include <QtSql/qsqldriver.h> 46 #include <QtSql/qsqlresult.h> 48 #if defined (Q_OS_WIN32) 49 #include <QtCore/qt_windows.h> 55 #define Q_EXPORT_SQLDRIVER_MYSQL 57 #define Q_EXPORT_SQLDRIVER_MYSQL Q_SQL_EXPORT 94 #if MYSQL_VERSION_ID >= 40108 123 bool trimStrings)
const;
131 bool beginTransaction();
132 bool commitTransaction();
133 bool rollbackTransaction();
143 #endif // QSQL_MYSQL_H The QVariant class acts like a union for the most common Qt data types.
The QSqlIndex class provides functions to manipulate and describe database indexes.
bool isNull(int field)
Returns true if the field at position index in the current row is null; otherwise returns false...
#define QT_END_NAMESPACE
This macro expands to.
DriverFeature
This enum contains a list of features a driver might support.
#define Q_EXPORT_SQLDRIVER_MYSQL
bool reset(const QString &query)
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...
bool fetchFirst()
Positions the result to the first record (row 0) in the result.
The QSqlRecord class encapsulates a database record.
The QSqlDriver class is an abstract base class for accessing specific SQL databases.
The QString class provides a Unicode character string.
The QObject class is the base class of all Qt objects.
QVariant handle() const
Returns the low-level database handle for this result set wrapped in a QVariant or an invalid QVarian...
int numRowsAffected()
Returns the number of rows affected by the last query executed, or -1 if it cannot be determined or i...
#define QT_BEGIN_NAMESPACE
This macro expands to.
QVariant lastInsertId() const
Returns the object ID of the most recent inserted row if the database supports it.
The QStringList class provides a list of strings.
bool fetchLast()
Positions the result to the last record (last row) in the result.
virtual bool exec()
Executes the query, returning true if successful; otherwise returns false.
virtual bool prepare(const QString &query)
Prepares the given query for execution; the query will normally use placeholders so that it can be ex...
bool fetch(int i)
Positions the result to an arbitrary (zero-based) row index.
bool fetchNext()
Positions the result to the next available record (row) in the result.
QVariant data(int field)
Returns the data for field index in the current row as a QVariant.
void virtual_hook(int id, void *data)
QSqlRecord record() const
Returns the current record if the query is active; otherwise returns an empty QSqlRecord.
QMYSQLResult(const QMYSQLDriver *db)
The QSqlField class manipulates the fields in SQL database tables and views.
The QSqlResult class provides an abstract interface for accessing data from specific SQL databases...
friend class QMYSQLDriver
IdentifierType
This enum contains a list of SQL identifier types.
int open(const char *, int,...)