adatabase_8h_source.html 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.18"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>openPilotLog: src/database/adatabase.h Source File</title>
  9. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <link href="navtree.css" rel="stylesheet" type="text/css"/>
  13. <script type="text/javascript" src="resize.js"></script>
  14. <script type="text/javascript" src="navtreedata.js"></script>
  15. <script type="text/javascript" src="navtree.js"></script>
  16. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  17. <script type="text/javascript" src="search/searchdata.js"></script>
  18. <script type="text/javascript" src="search/search.js"></script>
  19. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  20. <link href="custom_dark_theme.css" rel="stylesheet" type="text/css"/>
  21. </head>
  22. <body>
  23. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  24. <div id="titlearea">
  25. <table cellspacing="0" cellpadding="0">
  26. <tbody>
  27. <tr style="height: 56px;">
  28. <td id="projectlogo"><img alt="Logo" src="icon_main.png"/></td>
  29. <td id="projectalign" style="padding-left: 0.5em;">
  30. <div id="projectname">openPilotLog
  31. </div>
  32. </td>
  33. </tr>
  34. </tbody>
  35. </table>
  36. </div>
  37. <!-- end header part -->
  38. <!-- Generated by Doxygen 1.8.18 -->
  39. <script type="text/javascript">
  40. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  41. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  42. /* @license-end */
  43. </script>
  44. <script type="text/javascript" src="menudata.js"></script>
  45. <script type="text/javascript" src="menu.js"></script>
  46. <script type="text/javascript">
  47. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  48. $(function() {
  49. initMenu('',true,false,'search.php','Search');
  50. $(document).ready(function() { init_search(); });
  51. });
  52. /* @license-end */</script>
  53. <div id="main-nav"></div>
  54. </div><!-- top -->
  55. <div id="side-nav" class="ui-resizable side-nav-resizable">
  56. <div id="nav-tree">
  57. <div id="nav-tree-contents">
  58. <div id="nav-sync" class="sync"></div>
  59. </div>
  60. </div>
  61. <div id="splitbar" style="-moz-user-select:none;"
  62. class="ui-resizable-handle">
  63. </div>
  64. </div>
  65. <script type="text/javascript">
  66. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  67. $(document).ready(function(){initNavTree('adatabase_8h_source.html',''); initResizable(); });
  68. /* @license-end */
  69. </script>
  70. <div id="doc-content">
  71. <!-- window showing the filter options -->
  72. <div id="MSearchSelectWindow"
  73. onmouseover="return searchBox.OnSearchSelectShow()"
  74. onmouseout="return searchBox.OnSearchSelectHide()"
  75. onkeydown="return searchBox.OnSearchSelectKey(event)">
  76. </div>
  77. <!-- iframe showing the search results (closed by default) -->
  78. <div id="MSearchResultsWindow">
  79. <iframe src="javascript:void(0)" frameborder="0"
  80. name="MSearchResults" id="MSearchResults">
  81. </iframe>
  82. </div>
  83. <div class="header">
  84. <div class="headertitle">
  85. <div class="title">adatabase.h</div> </div>
  86. </div><!--header-->
  87. <div class="contents">
  88. <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div>
  89. <div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> *openPilotLog - A FOSS Pilot Logbook Application</span></div>
  90. <div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> *Copyright (C) 2020-2021 Felix Turowsky</span></div>
  91. <div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> *</span></div>
  92. <div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> *This program is free software: you can redistribute it and/or modify</span></div>
  93. <div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> *it under the terms of the GNU General Public License as published by</span></div>
  94. <div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> *the Free Software Foundation, either version 3 of the License, or</span></div>
  95. <div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> *(at your option) any later version.</span></div>
  96. <div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> *</span></div>
  97. <div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> *This program is distributed in the hope that it will be useful,</span></div>
  98. <div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> *but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div>
  99. <div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></div>
  100. <div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> *GNU General Public License for more details.</span></div>
  101. <div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> *</span></div>
  102. <div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> *You should have received a copy of the GNU General Public License</span></div>
  103. <div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> *along with this program. If not, see &lt;https://www.gnu.org/licenses/&gt;.</span></div>
  104. <div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment"> */</span></div>
  105. <div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="preprocessor">#ifndef ADATABASE_H</span></div>
  106. <div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="preprocessor">#define ADATABASE_H</span></div>
  107. <div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160; </div>
  108. <div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="preprocessor">#include &lt;QPair&gt;</span></div>
  109. <div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#include &lt;QMap&gt;</span></div>
  110. <div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#include &lt;QString&gt;</span></div>
  111. <div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="preprocessor">#include &lt;QDir&gt;</span></div>
  112. <div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#include &lt;QSqlDatabase&gt;</span></div>
  113. <div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="preprocessor">#include &lt;QSqlDriver&gt;</span></div>
  114. <div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor">#include &lt;QSqlQuery&gt;</span></div>
  115. <div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="preprocessor">#include &lt;QSqlError&gt;</span></div>
  116. <div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="preprocessor">#include &lt;QSqlTableModel&gt;</span></div>
  117. <div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor">#include &lt;QSqlQuery&gt;</span></div>
  118. <div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="preprocessor">#include &lt;QSqlRecord&gt;</span></div>
  119. <div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="preprocessor">#include &lt;QSqlField&gt;</span></div>
  120. <div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160; </div>
  121. <div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;<span class="preprocessor">#include &quot;src/database/adatabasetypes.h&quot;</span></div>
  122. <div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<span class="preprocessor">#include &quot;src/classes/aentry.h&quot;</span></div>
  123. <div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;<span class="preprocessor">#include &quot;src/classes/apilotentry.h&quot;</span></div>
  124. <div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="preprocessor">#include &quot;src/classes/atailentry.h&quot;</span></div>
  125. <div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;<span class="preprocessor">#include &quot;src/classes/aaircraftentry.h&quot;</span></div>
  126. <div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;<span class="preprocessor">#include &quot;src/classes/aflightentry.h&quot;</span></div>
  127. <div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;<span class="preprocessor">#include &quot;src/classes/astandardpaths.h&quot;</span></div>
  128. <div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;<span class="preprocessor">#include &quot;src/classes/acurrencyentry.h&quot;</span></div>
  129. <div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; </div>
  130. <div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;<span class="preprocessor">#define SQLITE_DRIVER QStringLiteral(&quot;QSQLITE&quot;)</span></div>
  131. <div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; </div>
  132. <div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;<span class="preprocessor">#define aDB ADatabase::instance()</span></div>
  133. <div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; </div>
  134. <div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;<span class="keyword">enum class</span> ADatabaseTarget</div>
  135. <div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160;{</div>
  136. <div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; aircraft,</div>
  137. <div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; airport_identifier_icao,</div>
  138. <div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; airport_identifier_iata,</div>
  139. <div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; airport_identifier_all,</div>
  140. <div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; airport_names,</div>
  141. <div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; pilots,</div>
  142. <div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; registrations,</div>
  143. <div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; companies,</div>
  144. <div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; tails</div>
  145. <div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160;};</div>
  146. <div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; </div>
  147. <div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160;<span class="keyword">enum class</span> ADatabaseSummaryKey {</div>
  148. <div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; total_flights,</div>
  149. <div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; total_tails,</div>
  150. <div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; total_pilots,</div>
  151. <div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; last_flight,</div>
  152. <div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; total_time,</div>
  153. <div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160;};</div>
  154. <div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; </div>
  155. <div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="class_a_database_error.html"> 86</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_a_database_error.html">ADatabaseError</a> : <span class="keyword">public</span> QSqlError {</div>
  156. <div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160;<span class="keyword">public</span>:</div>
  157. <div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; <a class="code" href="class_a_database_error.html">ADatabaseError</a>() = <span class="keywordflow">default</span>;</div>
  158. <div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; <a class="code" href="class_a_database_error.html">ADatabaseError</a>(QString msg);</div>
  159. <div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; QString text() <span class="keyword">const</span>;</div>
  160. <div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160;};</div>
  161. <div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; </div>
  162. <div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="class_a_database.html"> 97</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_a_database.html">ADatabase</a> : <span class="keyword">public</span> QObject {</div>
  163. <div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; Q_OBJECT</div>
  164. <div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; </div>
  165. <div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160;<span class="keyword">private</span>:</div>
  166. <div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; <span class="keyword">static</span> <a class="code" href="class_a_database.html">ADatabase</a>* <span class="keyword">self</span>;</div>
  167. <div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; TableNames_T tableNames;</div>
  168. <div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; TableColumns_T tableColumns;</div>
  169. <div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; <span class="keywordtype">int</span> databaseRevision;</div>
  170. <div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; </div>
  171. <div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; <a class="code" href="class_a_database.html">ADatabase</a>();</div>
  172. <div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; <span class="keywordtype">int</span> checkDbVersion() <span class="keyword">const</span>;</div>
  173. <div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160;<span class="keyword">public</span>:</div>
  174. <div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="class_a_database.html#a95d05441d87fa291acb96e37b029409e"> 113</a></span>&#160; <a class="code" href="class_a_database_error.html">ADatabaseError</a> <a class="code" href="class_a_database.html#a95d05441d87fa291acb96e37b029409e">lastError</a>;</div>
  175. <div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; </div>
  176. <div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; <span class="keyword">const</span> QFileInfo databaseFile;</div>
  177. <div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; </div>
  178. <div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; <span class="comment">// Ensure DB is not copiable or assignable</span></div>
  179. <div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; <a class="code" href="class_a_database.html">ADatabase</a>(<span class="keyword">const</span> <a class="code" href="class_a_database.html">ADatabase</a>&amp;) = <span class="keyword">delete</span>;</div>
  180. <div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="class_a_database.html">ADatabase</a>&amp;) = <span class="keyword">delete</span>;</div>
  181. <div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; <span class="keyword">static</span> <a class="code" href="class_a_database.html">ADatabase</a>* instance();</div>
  182. <div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; </div>
  183. <div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; <span class="keywordtype">int</span> <a class="code" href="class_a_database.html#a1c026e7784b03fc5822077c7d0071330">dbRevision</a>() <span class="keyword">const</span>;</div>
  184. <div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; </div>
  185. <div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; TableNames_T <a class="code" href="class_a_database.html#a4f0df6cc04e6d9b563db874a989ebc61">getTableNames</a>() <span class="keyword">const</span>;</div>
  186. <div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; </div>
  187. <div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; ColumnNames_T <a class="code" href="class_a_database.html#ad977866124a3c7f7184e165c02a68931">getTableColumns</a>(TableName_T table_name) <span class="keyword">const</span>;</div>
  188. <div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; </div>
  189. <div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_a_database.html#a3c0fdc84000ad397d61f0efabd032194">updateLayout</a>();</div>
  190. <div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; </div>
  191. <div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; <span class="keyword">const</span> QString <a class="code" href="class_a_database.html#a491415273a771dd7ea41452c331a34b0">sqliteVersion</a>() <span class="keyword">const</span>;</div>
  192. <div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; </div>
  193. <div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="class_a_database.html#aa6080200aa3f229251480bc416755fed">connect</a>();</div>
  194. <div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; </div>
  195. <div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_a_database.html#abc461aaa66304ca638e546f67a694935">disconnect</a>();</div>
  196. <div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; </div>
  197. <div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; <span class="keyword">static</span> QSqlDatabase <a class="code" href="class_a_database.html#a2379c9da900da8e96add932e4024389a">database</a>();</div>
  198. <div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; </div>
  199. <div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; QVector&lt;QVariant&gt; <a class="code" href="class_a_database.html#a2a43936d3ae28993f9f7eda0fdf4664d">customQuery</a>(QString statement, <span class="keywordtype">int</span> return_values);</div>
  200. <div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160; </div>
  201. <div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="class_a_database.html#a24f938e4c8d20afddb5e5651e041a7a6">exists</a>(<a class="code" href="class_a_entry.html">AEntry</a> entry);</div>
  202. <div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="class_a_database.html#a24f938e4c8d20afddb5e5651e041a7a6">exists</a>(<a class="code" href="struct_data_position.html">DataPosition</a> data_position);</div>
  203. <div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160; </div>
  204. <div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="class_a_database.html#a652472c747c0ce68940b17c9c23666dd">commit</a>(<a class="code" href="class_a_entry.html">AEntry</a> entry);</div>
  205. <div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; </div>
  206. <div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="class_a_database.html#a4ecb6d0c9b3813c90b3165c993e69ad5">insert</a>(<a class="code" href="class_a_entry.html">AEntry</a> new_entry);</div>
  207. <div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160; </div>
  208. <div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="class_a_database.html#a910bc0c1717e9301911343c082aa1aaa">update</a>(<a class="code" href="class_a_entry.html">AEntry</a> updated_entry);</div>
  209. <div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; </div>
  210. <div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="class_a_database.html#a4903909a28daed708e1a335d3be4f57b">remove</a>(<a class="code" href="class_a_entry.html">AEntry</a> entry);</div>
  211. <div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160; </div>
  212. <div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="class_a_database.html#a863d30e9e3a7c14adfe72787363618c8">removeMany</a>(QList&lt;DataPosition&gt;);</div>
  213. <div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160; </div>
  214. <div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160; RowData_T <a class="code" href="class_a_database.html#afc39f6136fc822e0649964fa22b84bf9">getEntryData</a>(<a class="code" href="struct_data_position.html">DataPosition</a> data_position);</div>
  215. <div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160; </div>
  216. <div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160; <a class="code" href="class_a_entry.html">AEntry</a> <a class="code" href="class_a_database.html#a8959b406b97d9520981890d92850b1ba">getEntry</a>(<a class="code" href="struct_data_position.html">DataPosition</a> data_position);</div>
  217. <div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160; </div>
  218. <div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160; <a class="code" href="struct_a_pilot_entry.html">APilotEntry</a> <a class="code" href="class_a_database.html#a426026d641a594863995ec5db8312259">getPilotEntry</a>(RowId_T row_id);</div>
  219. <div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160; </div>
  220. <div class="line"><a name="l00235"></a><span class="lineno"> 235</span>&#160; <a class="code" href="struct_a_tail_entry.html">ATailEntry</a> <a class="code" href="class_a_database.html#a356df159542705635dc3898d90682039">getTailEntry</a>(RowId_T row_id);</div>
  221. <div class="line"><a name="l00236"></a><span class="lineno"> 236</span>&#160; </div>
  222. <div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160; <a class="code" href="struct_a_aircraft_entry.html">AAircraftEntry</a> <a class="code" href="class_a_database.html#ae0a3c9273431195df6295b9da24b3a3a">getAircraftEntry</a>(RowId_T row_id);</div>
  223. <div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160; </div>
  224. <div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160; <a class="code" href="class_a_flight_entry.html">AFlightEntry</a> <a class="code" href="class_a_database.html#a7bb44738362582e4f54f68e3aa30d40a">getFlightEntry</a>(RowId_T row_id);</div>
  225. <div class="line"><a name="l00256"></a><span class="lineno"> 256</span>&#160; </div>
  226. <div class="line"><a name="l00260"></a><span class="lineno"> 260</span>&#160; <a class="code" href="struct_a_currency_entry.html">ACurrencyEntry</a> <a class="code" href="class_a_database.html#a5abdf1f35468f788609252c7a3be7bc4">getCurrencyEntry</a>(ACurrencyEntry::CurrencyName currency_name);</div>
  227. <div class="line"><a name="l00261"></a><span class="lineno"> 261</span>&#160; </div>
  228. <div class="line"><a name="l00266"></a><span class="lineno"> 266</span>&#160; <span class="keyword">const</span> QStringList <a class="code" href="class_a_database.html#a89de409c1828125363f46f384df47359">getCompletionList</a>(ADatabaseTarget target);</div>
  229. <div class="line"><a name="l00267"></a><span class="lineno"> 267</span>&#160; </div>
  230. <div class="line"><a name="l00273"></a><span class="lineno"> 273</span>&#160; <span class="keyword">const</span> QMap&lt;QString, RowId_T&gt; <a class="code" href="class_a_database.html#a5dba46567089112b28b16aaf985af0ba">getIdMap</a>(ADatabaseTarget target);</div>
  231. <div class="line"><a name="l00274"></a><span class="lineno"> 274</span>&#160; </div>
  232. <div class="line"><a name="l00278"></a><span class="lineno"> 278</span>&#160; <span class="keywordtype">int</span> <a class="code" href="class_a_database.html#a264fea56cd3fbc31463c587f196ce576">getLastEntry</a>(ADatabaseTarget target);</div>
  233. <div class="line"><a name="l00279"></a><span class="lineno"> 279</span>&#160; </div>
  234. <div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160; QList&lt;RowId_T&gt; <a class="code" href="class_a_database.html#a6006c47c82b2c72f7ab6b5cc319c5fbf">getForeignKeyConstraints</a>(RowId_T foreign_row_id, ADatabaseTarget target);</div>
  235. <div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160; </div>
  236. <div class="line"><a name="l00290"></a><span class="lineno"> 290</span>&#160; <a class="code" href="struct_a_pilot_entry.html">APilotEntry</a> <a class="code" href="class_a_database.html#a4640a4348dad468a0ff65bad05b07227">resolveForeignPilot</a>(RowId_T foreign_key);</div>
  237. <div class="line"><a name="l00291"></a><span class="lineno"> 291</span>&#160; </div>
  238. <div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160; <a class="code" href="struct_a_tail_entry.html">ATailEntry</a> <a class="code" href="class_a_database.html#a5878bcd4bc19e4c3fc5275ca7252860d">resolveForeignTail</a>(RowId_T foreign_key);</div>
  239. <div class="line"><a name="l00297"></a><span class="lineno"> 297</span>&#160; </div>
  240. <div class="line"><a name="l00306"></a><span class="lineno"> 306</span>&#160; QMap&lt;ADatabaseSummaryKey, QString&gt; <a class="code" href="class_a_database.html#a56baf4eaf25922030f3cfa6906963f7c">databaseSummary</a>(<span class="keyword">const</span> QString&amp; db_path);</div>
  241. <div class="line"><a name="l00307"></a><span class="lineno"> 307</span>&#160; </div>
  242. <div class="line"><a name="l00311"></a><span class="lineno"> 311</span>&#160; <span class="keyword">const</span> QString <a class="code" href="class_a_database.html#a2c54b7506faf0f15f5323ed53ff12099">databaseSummaryString</a>(<span class="keyword">const</span> QString&amp; db_path);</div>
  243. <div class="line"><a name="l00312"></a><span class="lineno"> 312</span>&#160; </div>
  244. <div class="line"><a name="l00313"></a><span class="lineno"> 313</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="class_a_database.html#a0bda52064f005f1463e56b60cd23b164">restoreBackup</a>(<span class="keyword">const</span> QString&amp; backup_file);</div>
  245. <div class="line"><a name="l00314"></a><span class="lineno"> 314</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="class_a_database.html#a5ab838a62a83974f9e40c62f66adfa99">createBackup</a>(<span class="keyword">const</span> QString&amp; dest_file);</div>
  246. <div class="line"><a name="l00315"></a><span class="lineno"> 315</span>&#160; </div>
  247. <div class="line"><a name="l00316"></a><span class="lineno"> 316</span>&#160; </div>
  248. <div class="line"><a name="l00317"></a><span class="lineno"> 317</span>&#160;signals:</div>
  249. <div class="line"><a name="l00324"></a><span class="lineno"><a class="line" href="class_a_database.html#a5ed8c010ccc022687ce903cfde8ae911"> 324</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_a_database.html#a5ed8c010ccc022687ce903cfde8ae911">dataBaseUpdated</a>();</div>
  250. <div class="line"><a name="l00329"></a><span class="lineno"><a class="line" href="class_a_database.html#a0f0bffbb6cdd79975b7b5ca6c0db31a7"> 329</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_a_database.html#a0f0bffbb6cdd79975b7b5ca6c0db31a7">connectionReset</a>();</div>
  251. <div class="line"><a name="l00330"></a><span class="lineno"> 330</span>&#160;};</div>
  252. <div class="line"><a name="l00331"></a><span class="lineno"> 331</span>&#160; </div>
  253. <div class="line"><a name="l00332"></a><span class="lineno"> 332</span>&#160;<span class="preprocessor">#endif // ADATABASE_H</span></div>
  254. </div><!-- fragment --></div><!-- contents -->
  255. </div><!-- doc-content -->
  256. <div class="ttc" id="aclass_a_database_html_a24f938e4c8d20afddb5e5651e041a7a6"><div class="ttname"><a href="class_a_database.html#a24f938e4c8d20afddb5e5651e041a7a6">ADatabase::exists</a></div><div class="ttdeci">bool exists(AEntry entry)</div><div class="ttdoc">Checks if an entry exists in the database, based on position data.</div><div class="ttdef"><b>Definition:</b> adatabase.cpp:229</div></div>
  257. <div class="ttc" id="aclass_a_database_html_a0bda52064f005f1463e56b60cd23b164"><div class="ttname"><a href="class_a_database.html#a0bda52064f005f1463e56b60cd23b164">ADatabase::restoreBackup</a></div><div class="ttdeci">bool restoreBackup(const QString &amp;backup_file)</div><div class="ttdoc">ADatabase::restoreBackup restores the database from a given backup file and replaces the currently ac...</div><div class="ttdef"><b>Definition:</b> adatabase.cpp:766</div></div>
  258. <div class="ttc" id="aclass_a_database_html_a3c0fdc84000ad397d61f0efabd032194"><div class="ttname"><a href="class_a_database.html#a3c0fdc84000ad397d61f0efabd032194">ADatabase::updateLayout</a></div><div class="ttdeci">void updateLayout()</div><div class="ttdoc">Updates the member variables tableNames and tableColumns with up-to-date layout information if the da...</div><div class="ttdef"><b>Definition:</b> adatabase.cpp:65</div></div>
  259. <div class="ttc" id="aclass_a_database_html_a2c54b7506faf0f15f5323ed53ff12099"><div class="ttname"><a href="class_a_database.html#a2c54b7506faf0f15f5323ed53ff12099">ADatabase::databaseSummaryString</a></div><div class="ttdeci">const QString databaseSummaryString(const QString &amp;db_path)</div><div class="ttdoc">returns a short summary string of the database, containing total time and date of last flight.</div><div class="ttdef"><b>Definition:</b> adatabase.cpp:726</div></div>
  260. <div class="ttc" id="aclass_a_database_html_a4640a4348dad468a0ff65bad05b07227"><div class="ttname"><a href="class_a_database.html#a4640a4348dad468a0ff65bad05b07227">ADatabase::resolveForeignPilot</a></div><div class="ttdeci">APilotEntry resolveForeignPilot(RowId_T foreign_key)</div><div class="ttdoc">Resolves the foreign key in a flight entry.</div><div class="ttdef"><b>Definition:</b> adatabase.cpp:630</div></div>
  261. <div class="ttc" id="aclass_a_database_html_a89de409c1828125363f46f384df47359"><div class="ttname"><a href="class_a_database.html#a89de409c1828125363f46f384df47359">ADatabase::getCompletionList</a></div><div class="ttdeci">const QStringList getCompletionList(ADatabaseTarget target)</div><div class="ttdoc">getCompletionList returns a QStringList of values for a QCompleter based on database values</div><div class="ttdef"><b>Definition:</b> adatabase.cpp:470</div></div>
  262. <div class="ttc" id="aclass_a_database_html_abc461aaa66304ca638e546f67a694935"><div class="ttname"><a href="class_a_database.html#abc461aaa66304ca638e546f67a694935">ADatabase::disconnect</a></div><div class="ttdeci">void disconnect()</div><div class="ttdoc">closes the database connection.</div><div class="ttdef"><b>Definition:</b> adatabase.cpp:131</div></div>
  263. <div class="ttc" id="aclass_a_flight_entry_html"><div class="ttname"><a href="class_a_flight_entry.html">AFlightEntry</a></div><div class="ttdef"><b>Definition:</b> aflightentry.h:23</div></div>
  264. <div class="ttc" id="aclass_a_database_html_a426026d641a594863995ec5db8312259"><div class="ttname"><a href="class_a_database.html#a426026d641a594863995ec5db8312259">ADatabase::getPilotEntry</a></div><div class="ttdeci">APilotEntry getPilotEntry(RowId_T row_id)</div><div class="ttdoc">retreives a PilotEntry from the database.</div><div class="ttdef"><b>Definition:</b> adatabase.cpp:435</div></div>
  265. <div class="ttc" id="aclass_a_database_error_html"><div class="ttname"><a href="class_a_database_error.html">ADatabaseError</a></div><div class="ttdoc">Custom Database Error derived from QSqlError. Extends text() adding &quot;Database Error: &quot; before the tex...</div><div class="ttdef"><b>Definition:</b> adatabase.h:86</div></div>
  266. <div class="ttc" id="astruct_a_pilot_entry_html"><div class="ttname"><a href="struct_a_pilot_entry.html">APilotEntry</a></div><div class="ttdef"><b>Definition:</b> apilotentry.h:24</div></div>
  267. <div class="ttc" id="aclass_a_database_html_aa6080200aa3f229251480bc416755fed"><div class="ttname"><a href="class_a_database.html#aa6080200aa3f229251480bc416755fed">ADatabase::connect</a></div><div class="ttdeci">bool connect()</div><div class="ttdoc">Connect to the database and populate database information.</div><div class="ttdef"><b>Definition:</b> adatabase.cpp:103</div></div>
  268. <div class="ttc" id="aclass_a_database_html_a5ab838a62a83974f9e40c62f66adfa99"><div class="ttname"><a href="class_a_database.html#a5ab838a62a83974f9e40c62f66adfa99">ADatabase::createBackup</a></div><div class="ttdeci">bool createBackup(const QString &amp;dest_file)</div><div class="ttdoc">ADatabase::createBackup copies the currently used database to an external backup location provided by...</div><div class="ttdef"><b>Definition:</b> adatabase.cpp:744</div></div>
  269. <div class="ttc" id="aclass_a_database_html_a0f0bffbb6cdd79975b7b5ca6c0db31a7"><div class="ttname"><a href="class_a_database.html#a0f0bffbb6cdd79975b7b5ca6c0db31a7">ADatabase::connectionReset</a></div><div class="ttdeci">void connectionReset()</div><div class="ttdoc">connectionReset is emitted whenever the database connection is reset, for example when creating or re...</div></div>
  270. <div class="ttc" id="aclass_a_database_html_a491415273a771dd7ea41452c331a34b0"><div class="ttname"><a href="class_a_database.html#a491415273a771dd7ea41452c331a34b0">ADatabase::sqliteVersion</a></div><div class="ttdeci">const QString sqliteVersion() const</div><div class="ttdoc">ADatabase::sqliteVersion returns the database sqlite version. See also dbRevision()</div><div class="ttdef"><b>Definition:</b> adatabase.cpp:94</div></div>
  271. <div class="ttc" id="aclass_a_database_html_a5ed8c010ccc022687ce903cfde8ae911"><div class="ttname"><a href="class_a_database.html#a5ed8c010ccc022687ce903cfde8ae911">ADatabase::dataBaseUpdated</a></div><div class="ttdeci">void dataBaseUpdated()</div><div class="ttdoc">updated is emitted whenever the database contents have been updated. This can be either a commit,...</div></div>
  272. <div class="ttc" id="aclass_a_database_html_a2a43936d3ae28993f9f7eda0fdf4664d"><div class="ttname"><a href="class_a_database.html#a2a43936d3ae28993f9f7eda0fdf4664d">ADatabase::customQuery</a></div><div class="ttdeci">QVector&lt; QVariant &gt; customQuery(QString statement, int return_values)</div><div class="ttdoc">Can be used to send a complex query to the database.</div><div class="ttdef"><b>Definition:</b> adatabase.cpp:640</div></div>
  273. <div class="ttc" id="aclass_a_database_html_a56baf4eaf25922030f3cfa6906963f7c"><div class="ttname"><a href="class_a_database.html#a56baf4eaf25922030f3cfa6906963f7c">ADatabase::databaseSummary</a></div><div class="ttdeci">QMap&lt; ADatabaseSummaryKey, QString &gt; databaseSummary(const QString &amp;db_path)</div><div class="ttdoc">Return a summary of a database.</div><div class="ttdef"><b>Definition:</b> adatabase.cpp:665</div></div>
  274. <div class="ttc" id="aclass_a_database_html_a8959b406b97d9520981890d92850b1ba"><div class="ttname"><a href="class_a_database.html#a8959b406b97d9520981890d92850b1ba">ADatabase::getEntry</a></div><div class="ttdeci">AEntry getEntry(DataPosition data_position)</div><div class="ttdoc">retreive an Entry from the database.</div><div class="ttdef"><b>Definition:</b> adatabase.cpp:428</div></div>
  275. <div class="ttc" id="aclass_a_database_html_a356df159542705635dc3898d90682039"><div class="ttname"><a href="class_a_database.html#a356df159542705635dc3898d90682039">ADatabase::getTailEntry</a></div><div class="ttdeci">ATailEntry getTailEntry(RowId_T row_id)</div><div class="ttdoc">retreives a TailEntry from the database.</div><div class="ttdef"><b>Definition:</b> adatabase.cpp:442</div></div>
  276. <div class="ttc" id="aclass_a_database_html_a7bb44738362582e4f54f68e3aa30d40a"><div class="ttname"><a href="class_a_database.html#a7bb44738362582e4f54f68e3aa30d40a">ADatabase::getFlightEntry</a></div><div class="ttdeci">AFlightEntry getFlightEntry(RowId_T row_id)</div><div class="ttdoc">retreives a flight entry from the database.</div><div class="ttdef"><b>Definition:</b> adatabase.cpp:456</div></div>
  277. <div class="ttc" id="aclass_a_database_html_a6006c47c82b2c72f7ab6b5cc319c5fbf"><div class="ttname"><a href="class_a_database.html#a6006c47c82b2c72f7ab6b5cc319c5fbf">ADatabase::getForeignKeyConstraints</a></div><div class="ttdeci">QList&lt; RowId_T &gt; getForeignKeyConstraints(RowId_T foreign_row_id, ADatabaseTarget target)</div><div class="ttdoc">returns a list of ROWID's in the flights table for which foreign key constraints exist.</div><div class="ttdef"><b>Definition:</b> adatabase.cpp:593</div></div>
  278. <div class="ttc" id="aclass_a_database_html_ae0a3c9273431195df6295b9da24b3a3a"><div class="ttname"><a href="class_a_database.html#ae0a3c9273431195df6295b9da24b3a3a">ADatabase::getAircraftEntry</a></div><div class="ttdeci">AAircraftEntry getAircraftEntry(RowId_T row_id)</div><div class="ttdoc">retreives a TailEntry from the database.</div><div class="ttdef"><b>Definition:</b> adatabase.cpp:449</div></div>
  279. <div class="ttc" id="astruct_data_position_html"><div class="ttname"><a href="struct_data_position.html">DataPosition</a></div><div class="ttdef"><b>Definition:</b> adatabasetypes.h:44</div></div>
  280. <div class="ttc" id="astruct_a_tail_entry_html"><div class="ttname"><a href="struct_a_tail_entry.html">ATailEntry</a></div><div class="ttdef"><b>Definition:</b> atailentry.h:24</div></div>
  281. <div class="ttc" id="aclass_a_database_html_a2379c9da900da8e96add932e4024389a"><div class="ttname"><a href="class_a_database.html#a2379c9da900da8e96add932e4024389a">ADatabase::database</a></div><div class="ttdeci">static QSqlDatabase database()</div><div class="ttdoc">Can be used to access the database connection.</div><div class="ttdef"><b>Definition:</b> adatabase.cpp:138</div></div>
  282. <div class="ttc" id="aclass_a_database_html"><div class="ttname"><a href="class_a_database.html">ADatabase</a></div><div class="ttdoc">The DB class encapsulates the SQL database by providing fast access to hot database data.</div><div class="ttdef"><b>Definition:</b> adatabase.h:97</div></div>
  283. <div class="ttc" id="aclass_a_database_html_a4903909a28daed708e1a335d3be4f57b"><div class="ttname"><a href="class_a_database.html#a4903909a28daed708e1a335d3be4f57b">ADatabase::remove</a></div><div class="ttdeci">bool remove(AEntry entry)</div><div class="ttdoc">deletes an entry from the database.</div><div class="ttdef"><b>Definition:</b> adatabase.cpp:152</div></div>
  284. <div class="ttc" id="aclass_a_database_html_a264fea56cd3fbc31463c587f196ce576"><div class="ttname"><a href="class_a_database.html#a264fea56cd3fbc31463c587f196ce576">ADatabase::getLastEntry</a></div><div class="ttdeci">int getLastEntry(ADatabaseTarget target)</div><div class="ttdoc">returns the ROWID for the newest entry in the respective database.</div><div class="ttdef"><b>Definition:</b> adatabase.cpp:565</div></div>
  285. <div class="ttc" id="aclass_a_database_html_a4f0df6cc04e6d9b563db874a989ebc61"><div class="ttname"><a href="class_a_database.html#a4f0df6cc04e6d9b563db874a989ebc61">ADatabase::getTableNames</a></div><div class="ttdeci">TableNames_T getTableNames() const</div><div class="ttdoc">Return the names of all tables in the database.</div><div class="ttdef"><b>Definition:</b> adatabase.cpp:60</div></div>
  286. <div class="ttc" id="aclass_a_database_html_afc39f6136fc822e0649964fa22b84bf9"><div class="ttname"><a href="class_a_database.html#afc39f6136fc822e0649964fa22b84bf9">ADatabase::getEntryData</a></div><div class="ttdeci">RowData_T getEntryData(DataPosition data_position)</div><div class="ttdoc">retreive entry data from the database to create an entry object</div><div class="ttdef"><b>Definition:</b> adatabase.cpp:371</div></div>
  287. <div class="ttc" id="aclass_a_database_html_a863d30e9e3a7c14adfe72787363618c8"><div class="ttname"><a href="class_a_database.html#a863d30e9e3a7c14adfe72787363618c8">ADatabase::removeMany</a></div><div class="ttdeci">bool removeMany(QList&lt; DataPosition &gt;)</div><div class="ttdoc">deletes a list of entries from the database. Optimised for speed when deleting many entries.</div><div class="ttdef"><b>Definition:</b> adatabase.cpp:183</div></div>
  288. <div class="ttc" id="aclass_a_database_html_a5abdf1f35468f788609252c7a3be7bc4"><div class="ttname"><a href="class_a_database.html#a5abdf1f35468f788609252c7a3be7bc4">ADatabase::getCurrencyEntry</a></div><div class="ttdeci">ACurrencyEntry getCurrencyEntry(ACurrencyEntry::CurrencyName currency_name)</div><div class="ttdoc">Retreives a currency entry from the database.</div><div class="ttdef"><b>Definition:</b> adatabase.cpp:463</div></div>
  289. <div class="ttc" id="astruct_a_aircraft_entry_html"><div class="ttname"><a href="struct_a_aircraft_entry.html">AAircraftEntry</a></div><div class="ttdef"><b>Definition:</b> aaircraftentry.h:24</div></div>
  290. <div class="ttc" id="astruct_a_currency_entry_html"><div class="ttname"><a href="struct_a_currency_entry.html">ACurrencyEntry</a></div><div class="ttdef"><b>Definition:</b> acurrencyentry.h:8</div></div>
  291. <div class="ttc" id="aclass_a_database_html_a5878bcd4bc19e4c3fc5275ca7252860d"><div class="ttname"><a href="class_a_database.html#a5878bcd4bc19e4c3fc5275ca7252860d">ADatabase::resolveForeignTail</a></div><div class="ttdeci">ATailEntry resolveForeignTail(RowId_T foreign_key)</div><div class="ttdoc">Resolves the foreign key in a flight entry.</div><div class="ttdef"><b>Definition:</b> adatabase.cpp:635</div></div>
  292. <div class="ttc" id="aclass_a_database_html_a1c026e7784b03fc5822077c7d0071330"><div class="ttname"><a href="class_a_database.html#a1c026e7784b03fc5822077c7d0071330">ADatabase::dbRevision</a></div><div class="ttdeci">int dbRevision() const</div><div class="ttdoc">dbRevision returns the database Revision Number. The Revision refers to what iteration of the databas...</div><div class="ttdef"><b>Definition:</b> adatabase.cpp:43</div></div>
  293. <div class="ttc" id="aclass_a_database_html_a5dba46567089112b28b16aaf985af0ba"><div class="ttname"><a href="class_a_database.html#a5dba46567089112b28b16aaf985af0ba">ADatabase::getIdMap</a></div><div class="ttdeci">const QMap&lt; QString, RowId_T &gt; getIdMap(ADatabaseTarget target)</div><div class="ttdoc">returns a QMap&lt;QString, RowId_t&gt; of a human-readable database value and its row id....</div><div class="ttdef"><b>Definition:</b> adatabase.cpp:519</div></div>
  294. <div class="ttc" id="aclass_a_database_html_a652472c747c0ce68940b17c9c23666dd"><div class="ttname"><a href="class_a_database.html#a652472c747c0ce68940b17c9c23666dd">ADatabase::commit</a></div><div class="ttdeci">bool commit(AEntry entry)</div><div class="ttdoc">commits an entry to the database, calls either insert or update, based on position data</div><div class="ttdef"><b>Definition:</b> adatabase.cpp:143</div></div>
  295. <div class="ttc" id="aclass_a_database_html_a95d05441d87fa291acb96e37b029409e"><div class="ttname"><a href="class_a_database.html#a95d05441d87fa291acb96e37b029409e">ADatabase::lastError</a></div><div class="ttdeci">ADatabaseError lastError</div><div class="ttdoc">lastError extends QSqlError. Holds information about the last error that ocurred during a SQL operati...</div><div class="ttdef"><b>Definition:</b> adatabase.h:113</div></div>
  296. <div class="ttc" id="aclass_a_entry_html"><div class="ttname"><a href="class_a_entry.html">AEntry</a></div><div class="ttdoc">The Entry class encapsulates table metadata(table name, row id) and data for new and existing entries...</div><div class="ttdef"><b>Definition:</b> aentry.h:40</div></div>
  297. <div class="ttc" id="aclass_a_database_html_a4ecb6d0c9b3813c90b3165c993e69ad5"><div class="ttname"><a href="class_a_database.html#a4ecb6d0c9b3813c90b3165c993e69ad5">ADatabase::insert</a></div><div class="ttdeci">bool insert(AEntry new_entry)</div><div class="ttdoc">Create new entry in the databse based on UserInput.</div><div class="ttdef"><b>Definition:</b> adatabase.cpp:325</div></div>
  298. <div class="ttc" id="aclass_a_database_html_ad977866124a3c7f7184e165c02a68931"><div class="ttname"><a href="class_a_database.html#ad977866124a3c7f7184e165c02a68931">ADatabase::getTableColumns</a></div><div class="ttdeci">ColumnNames_T getTableColumns(TableName_T table_name) const</div><div class="ttdoc">Return the names of a given table in the database.</div><div class="ttdef"><b>Definition:</b> adatabase.cpp:55</div></div>
  299. <div class="ttc" id="aclass_a_database_html_a910bc0c1717e9301911343c082aa1aaa"><div class="ttname"><a href="class_a_database.html#a910bc0c1717e9301911343c082aa1aaa">ADatabase::update</a></div><div class="ttdeci">bool update(AEntry updated_entry)</div><div class="ttdoc">Updates entry in database from existing entry tweaked by the user.</div><div class="ttdef"><b>Definition:</b> adatabase.cpp:289</div></div>
  300. <!-- start footer part -->
  301. <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  302. <ul>
  303. <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_803ee67260c130b45d29089798491ab2.html">database</a></li><li class="navelem"><b>adatabase.h</b></li>
  304. <li class="footer">Generated by
  305. <a href="http://www.doxygen.org/index.html">
  306. <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
  307. </ul>
  308. </div>
  309. </body>
  310. </html>