# openPilotLog: ADataBaseSetup Class Reference

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 | fillTemplates ()
static bool | importDefaultData ()
static bool | resetToDefault ()
| DbSetup::resetToDefault Empties all user-generated content in the database. More...
static bool | commitData (QVector< QStringList > fromCSV, const QString &tableName)
| 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 > | fromCSV,
|  | const QString & | tableName
| ) |  |

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

## 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:

- src/database/adatabasesetup.h
- src/database/adatabasesetup.cpp