ADataBaseSetup(3)

NAME
ADataBaseSetup - The ADataBaseSetup class is responsible for the inital setup of the database when the application is first launched. It creates the database in the specified default location and creates all required tables and views. It can also be used to reset the database currently used.

SYNOPSIS

#include <adatabasesetup.h>

  Static Public Member Functions
static void debug ()
dbSetup::debug prints Database Layout
static bool createDatabase ()
static bool downloadTemplates ()
static bool backupOldData ()
static bool fillTemplates ()
static bool importDefaultData (bool use_local_data)
static bool resetToDefault ()
DbSetup::resetToDefault Empties all user-generated content in the database.
static bool commitData (QVector< QStringList > from_csv, const QString &table_name)
DbSetup::commitData inserts the data parsed from a csv file into the database. The first line of the csv file has to contain the column names of the corresponding table in the database.
static bool commitDataJson (const QJsonArray &json_arr, const QString &table_name)
commitDataJson Commits data read from a JSON array to the database.

Detailed Description

The ADataBaseSetup class is responsible for the inital setup of the database when the application is first launched. It creates the database in the specified default location and creates all required tables and views. It can also be used to reset the database currently used.

Member Function Documentation

  QT_DEPRECATED bool ADataBaseSetup::commitData (QVector< QStringList > from_csv, const QString & table_name) [static]

DbSetup::commitData inserts the data parsed from a csv file into the database. The first line of the csv file has to contain the column names of the corresponding table in the database.

Parameters
    fromCSV input as parsed from CSV::read()
    tableName as in the database

Returns

  QT_DEPRECATED bool ADataBaseSetup::commitDataJson (const QJsonArray & json_arr, const QString & table_name) [static]

commitDataJson Commits data read from a JSON array to the database.

Parameters
    json_arr
    table_name The table that will be written to

  QT_DEPRECATED bool ADataBaseSetup::resetToDefault () [static]

DbSetup::resetToDefault Empties all user-generated content in the database.

Returns
    true on success

Author

Generated automatically by Doxygen for openPilotLog from the source code.