123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- #ifndef EASYQTSQL_NONQUERYRESULT_H
- #define EASYQTSQL_NONQUERYRESULT_H
- #ifndef EASY_QT_SQL_MAIN
- #include <QtSql>
- #endif
- class NonQueryResult
- {
- friend class Database;
- friend class Transaction;
- friend class InsertQuery;
- friend class UpdateQuery;
- friend class DeleteQuery;
- public:
-
- QSqlQuery &unwrappedQuery()
- {
- return m_query;
- }
-
- int numRowsAffected() const
- {
- return m_query.numRowsAffected();
- }
-
- QVariant lastInsertId() const
- {
- return m_query.lastInsertId();
- }
-
- QSqlError lastError() const
- {
- return m_query.lastError();
- }
-
- QString lastQuery() const
- {
- return m_query.lastQuery();
- }
-
- QString executedQuery() const
- {
- return m_query.executedQuery();
- }
- private:
- explicit NonQueryResult(const QSqlQuery &q)
- : m_query(q)
- { }
- QSqlQuery m_query;
- };
- #endif
|