|
QGroundControl
Ground Control Station for MAVLink Drones
|
#include <QGCSqlHelper.h>
Public Member Functions | |
| ScopedConnection (const QString &dbPath, bool readOnly=false) | |
| ~ScopedConnection () | |
| ScopedConnection (const ScopedConnection &)=delete | |
| ScopedConnection & | operator= (const ScopedConnection &)=delete |
| bool | isValid () const |
| QSqlDatabase | database () const |
RAII wrapper around QSqlDatabase::addDatabase / removeDatabase. Creates a uniquely-named connection on construction, removes it on destruction. Avoids the common pitfall of reusing connection names or forgetting to call removeDatabase.
Definition at line 26 of file QGCSqlHelper.h.
|
explicit |
Opens a connection to dbPath using the QSQLITE driver. If readOnly is true, QSQLITE_OPEN_READONLY is set.
Definition at line 29 of file QGCSqlHelper.cc.
References QGCSqlHelper::applySqlitePragmas().
| QGCSqlHelper::ScopedConnection::~ScopedConnection | ( | ) |
Definition at line 49 of file QGCSqlHelper.cc.
|
delete |
| QSqlDatabase QGCSqlHelper::ScopedConnection::database | ( | ) | const |
Definition at line 62 of file QGCSqlHelper.cc.
|
inline |
Definition at line 37 of file QGCSqlHelper.h.
|
delete |