The DB class encapsulates the SQL database by providing fast access to hot database data.  
 More...
|  | 
|  | ADatabase (const ADatabase &)=delete | 
|  | 
| void | operator= (const ADatabase &)=delete | 
|  | 
| int | dbVersion () const | 
|  | 
| TableNames_T | getTableNames () const | 
|  | Return the names of all tables in the database. 
 | 
|  | 
| ColumnNames_T | getTableColumns (TableName_T table_name) const | 
|  | Return the names of a given table in the database. 
 | 
|  | 
| void | updateLayout () | 
|  | Updates the member variables tableNames and tableColumns with up-to-date layout information if the database has been altered. This function is normally only required during database setup or maintenance. 
 | 
|  | 
| const QString | sqliteVersion () const | 
|  | ADatabase::sqliteVersion returns database sqlite version.  More... 
 | 
|  | 
| bool | connect () | 
|  | Connect to the database and populate database information. 
 | 
|  | 
| void | disconnect () | 
|  | closes the database connection. 
 | 
|  | 
| QVector< QVariant > | customQuery (QString statement, int return_values) | 
|  | Can be used to send a complex query to the database.  More... 
 | 
|  | 
| bool | exists (AEntry entry) | 
|  | Checks if an entry exists in the database, based on position data. 
 | 
|  | 
| bool | exists (DataPosition data_position) | 
|  | 
| bool | commit (AEntry entry) | 
|  | commits an entry to the database, calls either insert or update, based on position data 
 | 
|  | 
| bool | insert (AEntry new_entry) | 
|  | Create new entry in the databse based on UserInput. 
 | 
|  | 
| bool | update (AEntry updated_entry) | 
|  | Updates entry in database from existing entry tweaked by the user. 
 | 
|  | 
| bool | remove (AEntry entry) | 
|  | deletes an entry from the database. 
 | 
|  | 
| bool | removeMany (QList< DataPosition >) | 
|  | deletes a list of entries from the database. Optimised for speed when deleting many entries. 
 | 
|  | 
| RowData_T | getEntryData (DataPosition data_position) | 
|  | retreive entry data from the database to create an entry object 
 | 
|  | 
| AEntry | getEntry (DataPosition data_position) | 
|  | retreive an Entry from the database. 
 | 
|  | 
| APilotEntry | getPilotEntry (RowId_T row_id) | 
|  | retreives a PilotEntry from the database.  More... 
 | 
|  | 
| ATailEntry | getTailEntry (RowId_T row_id) | 
|  | retreives a TailEntry from the database.  More... 
 | 
|  | 
| AAircraftEntry | getAircraftEntry (RowId_T row_id) | 
|  | retreives a TailEntry from the database.  More... 
 | 
|  | 
| AFlightEntry | getFlightEntry (RowId_T row_id) | 
|  | retreives a flight entry from the database.  More... 
 | 
|  | 
| ACurrencyEntry | getCurrencyEntry (ACurrencyEntry::CurrencyName currency_name) | 
|  | Retreives a currency entry from the database. 
 | 
|  | 
| const QStringList | getCompletionList (ADatabaseTarget target) | 
|  | getCompletionList returns a QStringList of values for a QCompleter based on database values 
 | 
|  | 
| const QMap< QString, RowId_T > | getIdMap (ADatabaseTarget target) | 
|  | returns a QMap<QString, RowId_t> of a human-readable database value and its row id. Used in the Dialogs to map user input to unique database entries.  More... 
 | 
|  | 
| int | getLastEntry (ADatabaseTarget target) | 
|  | returns the ROWID for the newest entry in the respective database. 
 | 
|  | 
| QList< RowId_T > | getForeignKeyConstraints (RowId_T foreign_row_id, ADatabaseTarget target) | 
|  | returns a list of ROWID's in the flights table for which foreign key constraints exist. 
 | 
|  | 
| APilotEntry | resolveForeignPilot (RowId_T foreign_key) | 
|  | Resolves the foreign key in a flight entry.  More... 
 | 
|  | 
| ATailEntry | resolveForeignTail (RowId_T foreign_key) | 
|  | Resolves the foreign key in a flight entry.  More... 
 | 
|  | 
| QMap< ADatabaseSummaryKey, QString > | databaseSummary (const QString &db_path) | 
|  | Return the summary of the DB_PATH as a stringlist.  More... 
 | 
|  | 
| bool | restoreBackup (const QString &backup_file) | 
|  | ADatabase::restoreBackup restores the database from a given backup file and replaces the currently active database.  More... 
 | 
|  | 
| bool | createBackup (const QString &dest_file) | 
|  | ADatabase::createBackup copies the currently used database to an external backup location provided by the user.  More... 
 | 
|  | 
The DB class encapsulates the SQL database by providing fast access to hot database data.