123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- .TH "DataBaseSetup" 3 "Tue Jul 27 2021" "openPilotLog" \" -*- nroff -*-
- .ad l
- .nh
- .SH NAME
- DataBaseSetup \- The \fBDataBaseSetup\fP 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\&.
- .SH SYNOPSIS
- .br
- .PP
- .PP
- \fC#include <databasesetup\&.h>\fP
- .SS "Static Public Member Functions"
- .in +1c
- .ti -1c
- .RI "static void \fBdebug\fP ()"
- .br
- .RI "dbSetup::debug prints Database Layout "
- .ti -1c
- .RI "static bool \fBcreateDatabase\fP ()"
- .br
- .ti -1c
- .RI "static bool \fBdownloadTemplates\fP ()"
- .br
- .ti -1c
- .RI "static bool \fBbackupOldData\fP ()"
- .br
- .ti -1c
- .RI "static bool \fBfillTemplates\fP ()"
- .br
- .ti -1c
- .RI "static bool \fBimportDefaultData\fP (bool use_local_data)"
- .br
- .ti -1c
- .RI "static bool \fBresetToDefault\fP ()"
- .br
- .RI "DbSetup::resetToDefault Empties all user-generated content in the database\&. "
- .ti -1c
- .RI "static bool \fBcommitData\fP (QVector< QStringList > from_csv, const QString &table_name)"
- .br
- .RI "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\&. "
- .ti -1c
- .RI "static bool \fBcommitDataJson\fP (const QJsonArray &json_arr, const QString &table_name)"
- .br
- .RI "commitDataJson Commits data read from a JSON array to the database\&. "
- .in -1c
- .SH "Detailed Description"
- .PP
- The \fBDataBaseSetup\fP 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\&.
- .SH "Member Function Documentation"
- .PP
- .SS "QT_DEPRECATED bool DataBaseSetup::commitData (QVector< QStringList > from_csv, const QString & table_name)\fC [static]\fP"
- .PP
- 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\&.
- .PP
- \fBParameters\fP
- .RS 4
- \fIfromCSV\fP input as parsed from CSV::read()
- .br
- \fItableName\fP as in the database
- .RE
- .PP
- \fBReturns\fP
- .RS 4
- .RE
- .PP
- .SS "QT_DEPRECATED bool DataBaseSetup::commitDataJson (const QJsonArray & json_arr, const QString & table_name)\fC [static]\fP"
- .PP
- commitDataJson Commits data read from a JSON array to the database\&.
- .PP
- \fBParameters\fP
- .RS 4
- \fIjson_arr\fP
- .br
- \fItable_name\fP The table that will be written to
- .RE
- .PP
- .SS "QT_DEPRECATED bool DataBaseSetup::resetToDefault ()\fC [static]\fP"
- .PP
- DbSetup::resetToDefault Empties all user-generated content in the database\&.
- .PP
- \fBReturns\fP
- .RS 4
- true on success
- .RE
- .PP
- .SH "Author"
- .PP
- Generated automatically by Doxygen for openPilotLog from the source code\&.
|