diff options
author | Timothy Pearson <[email protected]> | 2014-09-03 18:37:06 -0500 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2014-09-03 18:37:06 -0500 |
commit | 7b43eed24a592feae9b6ba8fa338fb9737bf089f (patch) | |
tree | 64290972b342da11439be46b3658983151f4bec0 /src/sql/drivers/sqlite | |
parent | 4de369738339e5755968b1bcbae0baa515917386 (diff) | |
download | qt3-7b43eed24a592feae9b6ba8fa338fb9737bf089f.tar.gz qt3-7b43eed24a592feae9b6ba8fa338fb9737bf089f.zip |
Add ability to set reconnect flag on MySQL connections
Add database server ping method to SQL classes
Diffstat (limited to 'src/sql/drivers/sqlite')
-rw-r--r-- | src/sql/drivers/sqlite/qsql_sqlite.cpp | 11 | ||||
-rw-r--r-- | src/sql/drivers/sqlite/qsql_sqlite.h | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/sql/drivers/sqlite/qsql_sqlite.cpp b/src/sql/drivers/sqlite/qsql_sqlite.cpp index f8c7ffa..fea2a63 100644 --- a/src/sql/drivers/sqlite/qsql_sqlite.cpp +++ b/src/sql/drivers/sqlite/qsql_sqlite.cpp @@ -352,6 +352,17 @@ void QSQLiteDriver::close() } } +bool QSQLiteDriver::ping() +{ + if ( !isOpen() ) { + return FALSE; + } + + // FIXME + // Implement ping if available + return TRUE; +} + QSqlQuery QSQLiteDriver::createQuery() const { return QSqlQuery(new QSQLiteResult(this)); diff --git a/src/sql/drivers/sqlite/qsql_sqlite.h b/src/sql/drivers/sqlite/qsql_sqlite.h index f3b9192..1e3f84b 100644 --- a/src/sql/drivers/sqlite/qsql_sqlite.h +++ b/src/sql/drivers/sqlite/qsql_sqlite.h @@ -72,6 +72,7 @@ public: const QString & host, int port ) { return open (db, user, password, host, port, QString()); } void close(); + bool ping(); QSqlQuery createQuery() const; bool beginTransaction(); bool commitTransaction(); |