2
0

ADataBaseSetup.3 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. .TH "ADataBaseSetup" 3 "Sun Dec 27 2020" "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 \fBfillTemplates\fP ()"
  22. .br
  23. .ti -1c
  24. .RI "static bool \fBimportDefaultData\fP ()"
  25. .br
  26. .ti -1c
  27. .RI "static bool \fBresetToDefault\fP ()"
  28. .br
  29. .RI "DbSetup::resetToDefault Empties all user-generated content in the database\&. "
  30. .ti -1c
  31. .RI "static bool \fBcommitData\fP (QVector< QStringList > fromCSV, const QString &tableName)"
  32. .br
  33. .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\&. "
  34. .in -1c
  35. .SH "Detailed Description"
  36. .PP
  37. 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\&.
  38. .SH "Member Function Documentation"
  39. .PP
  40. .SS "bool ADataBaseSetup::commitData (QVector< QStringList > fromCSV, const QString & tableName)\fC [static]\fP"
  41. .PP
  42. 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\&.
  43. .PP
  44. \fBParameters\fP
  45. .RS 4
  46. \fIfromCSV\fP input as parsed from CSV::read()
  47. .br
  48. \fItableName\fP as in the database
  49. .RE
  50. .PP
  51. \fBReturns\fP
  52. .RS 4
  53. .RE
  54. .PP
  55. .SS "bool ADataBaseSetup::resetToDefault ()\fC [static]\fP"
  56. .PP
  57. DbSetup::resetToDefault Empties all user-generated content in the database\&.
  58. .PP
  59. \fBReturns\fP
  60. .RS 4
  61. true on success
  62. .RE
  63. .PP
  64. .SH "Author"
  65. .PP
  66. Generated automatically by Doxygen for openPilotLog from the source code\&.