diff options
author | Mark Brand <mabrand@mabrand.nl> | 2015-11-23 12:19:25 +0100 |
---|---|---|
committer | Mark Brand <mabrand@mabrand.nl> | 2015-11-27 12:15:15 +0000 |
commit | d6ecdb434410ffda64058cdb51483786f5af9932 (patch) | |
tree | 4ce01725938a7d19b6bb3313492be0cac282d626 /src/sql/drivers/psql/qsql_psql.cpp | |
parent | 6333edfdf3a682dfa8f54fe021f9aa55d6c91049 (diff) |
qsql: move Q<driver>Result out of header
Leaf result classes do not need to be exposed in the headers. The
implementations were inconsistent on this point.
Change-Id: I5bd41ae9e77b932f6232218a014400a59f2ef5a0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'src/sql/drivers/psql/qsql_psql.cpp')
-rw-r--r-- | src/sql/drivers/psql/qsql_psql.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/sql/drivers/psql/qsql_psql.cpp b/src/sql/drivers/psql/qsql_psql.cpp index 5dcabb0646..781317c46a 100644 --- a/src/sql/drivers/psql/qsql_psql.cpp +++ b/src/sql/drivers/psql/qsql_psql.cpp @@ -119,6 +119,35 @@ inline void qPQfreemem(void *buffer) PQfreemem(buffer); } +class QPSQLResultPrivate; + +class QPSQLResult: public QSqlResult +{ + Q_DECLARE_PRIVATE(QPSQLResult) + +public: + QPSQLResult(const QPSQLDriver *db); + ~QPSQLResult(); + + QVariant handle() const Q_DECL_OVERRIDE; + void virtual_hook(int id, void *data) Q_DECL_OVERRIDE; + +protected: + void cleanup(); + bool fetch(int i) Q_DECL_OVERRIDE; + bool fetchFirst() Q_DECL_OVERRIDE; + bool fetchLast() Q_DECL_OVERRIDE; + QVariant data(int i) Q_DECL_OVERRIDE; + bool isNull(int field) Q_DECL_OVERRIDE; + bool reset (const QString &query) Q_DECL_OVERRIDE; + int size() Q_DECL_OVERRIDE; + int numRowsAffected() Q_DECL_OVERRIDE; + QSqlRecord record() const Q_DECL_OVERRIDE; + QVariant lastInsertId() const Q_DECL_OVERRIDE; + bool prepare(const QString &query) Q_DECL_OVERRIDE; + bool exec() Q_DECL_OVERRIDE; +}; + class QPSQLDriverPrivate : public QSqlDriverPrivate { Q_DECLARE_PUBLIC(QPSQLDriver) |