openPilotLog
ADataBaseSetup Class Reference

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. More...

#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. More...
 
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. More...
 

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

◆ commitData()

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
fromCSVinput as parsed from CSV::read()
tableNameas in the database
Returns

◆ resetToDefault()

bool ADataBaseSetup::resetToDefault ( )
static

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

Returns
true on success

The documentation for this class was generated from the following files: