2
0

ADataBaseSetup.3 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. .TH "ADataBaseSetup" 3 "Tue May 4 2021" "openPilotLog" \" -*- nroff -*-
  2. .ad l
  3. .nh
  4. .SH NAME
  5. ADataBaseSetup \- The \fBADataBaseSetup\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\&.
  6. .SH SYNOPSIS
  7. .br
  8. .PP
  9. .PP
  10. \fC#include <adatabasesetup\&.h>\fP
  11. .SS "Static Public Member Functions"
  12. .in +1c
  13. .ti -1c
  14. .RI "static void \fBdebug\fP ()"
  15. .br
  16. .RI "dbSetup::debug prints Database Layout "
  17. .ti -1c
  18. .RI "static bool \fBcreateDatabase\fP ()"
  19. .br
  20. .ti -1c
  21. .RI "static bool \fBdownloadTemplates\fP ()"
  22. .br
  23. .ti -1c
  24. .RI "static bool \fBbackupOldData\fP ()"
  25. .br
  26. .ti -1c
  27. .RI "static bool \fBfillTemplates\fP ()"
  28. .br
  29. .ti -1c
  30. .RI "static bool \fBimportDefaultData\fP (bool use_local_data)"
  31. .br
  32. .ti -1c
  33. .RI "static bool \fBresetToDefault\fP ()"
  34. .br
  35. .RI "DbSetup::resetToDefault Empties all user-generated content in the database\&. "
  36. .ti -1c
  37. .RI "static bool \fBcommitData\fP (QVector< QStringList > from_csv, const QString &table_name)"
  38. .br
  39. .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\&. "
  40. .in -1c
  41. .SH "Detailed Description"
  42. .PP
  43. The \fBADataBaseSetup\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\&.
  44. .SH "Member Function Documentation"
  45. .PP
  46. .SS "bool ADataBaseSetup::commitData (QVector< QStringList > from_csv, const QString & table_name)\fC [static]\fP"
  47. .PP
  48. 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\&.
  49. .PP
  50. \fBParameters\fP
  51. .RS 4
  52. \fIfromCSV\fP input as parsed from CSV::read()
  53. .br
  54. \fItableName\fP as in the database
  55. .RE
  56. .PP
  57. \fBReturns\fP
  58. .RS 4
  59. .RE
  60. .PP
  61. .SS "bool ADataBaseSetup::resetToDefault ()\fC [static]\fP"
  62. .PP
  63. DbSetup::resetToDefault Empties all user-generated content in the database\&.
  64. .PP
  65. \fBReturns\fP
  66. .RS 4
  67. true on success
  68. .RE
  69. .PP
  70. .SH "Author"
  71. .PP
  72. Generated automatically by Doxygen for openPilotLog from the source code\&.