class_a_database.html 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605
  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: ADatabase Class Reference</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('class_a_database.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="summary">
  85. <a href="#signals">Signals</a> &#124;
  86. <a href="#pub-methods">Public Member Functions</a> &#124;
  87. <a href="#pub-static-methods">Static Public Member Functions</a> &#124;
  88. <a href="#pub-attribs">Public Attributes</a> &#124;
  89. <a href="class_a_database-members.html">List of all members</a> </div>
  90. <div class="headertitle">
  91. <div class="title">ADatabase Class Reference</div> </div>
  92. </div><!--header-->
  93. <div class="contents">
  94. <p>The DB class encapsulates the SQL database by providing fast access to hot database data.
  95. <a href="class_a_database.html#details">More...</a></p>
  96. <p><code>#include &lt;<a class="el" href="adatabase_8h_source.html">adatabase.h</a>&gt;</code></p>
  97. <div class="dynheader">
  98. Inheritance diagram for ADatabase:</div>
  99. <div class="dyncontent">
  100. <div class="center">
  101. <img src="class_a_database.png" alt=""/>
  102. </div></div>
  103. <table class="memberdecls">
  104. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="signals"></a>
  105. Signals</h2></td></tr>
  106. <tr class="memitem:a5ed8c010ccc022687ce903cfde8ae911"><td class="memItemLeft" align="right" valign="top"><a id="a5ed8c010ccc022687ce903cfde8ae911"></a>
  107. void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_database.html#a5ed8c010ccc022687ce903cfde8ae911">dataBaseUpdated</a> ()</td></tr>
  108. <tr class="memdesc:a5ed8c010ccc022687ce903cfde8ae911"><td class="mdescLeft">&#160;</td><td class="mdescRight">updated is emitted whenever the database contents have been updated. This can be either a commit, update or remove. This signal should be used to trigger an update to the models of the views displaying database contents in the user interface so that a user is always presented with up-to-date information. <br /></td></tr>
  109. <tr class="separator:a5ed8c010ccc022687ce903cfde8ae911"><td class="memSeparator" colspan="2">&#160;</td></tr>
  110. <tr class="memitem:a0f0bffbb6cdd79975b7b5ca6c0db31a7"><td class="memItemLeft" align="right" valign="top"><a id="a0f0bffbb6cdd79975b7b5ca6c0db31a7"></a>
  111. void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_database.html#a0f0bffbb6cdd79975b7b5ca6c0db31a7">connectionReset</a> ()</td></tr>
  112. <tr class="memdesc:a0f0bffbb6cdd79975b7b5ca6c0db31a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">connectionReset is emitted whenever the database connection is reset, for example when creating or restoring a backup. <br /></td></tr>
  113. <tr class="separator:a0f0bffbb6cdd79975b7b5ca6c0db31a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  114. </table><table class="memberdecls">
  115. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  116. Public Member Functions</h2></td></tr>
  117. <tr class="memitem:aad08b473425d508107bc6c872cb53334"><td class="memItemLeft" align="right" valign="top"><a id="aad08b473425d508107bc6c872cb53334"></a>
  118. &#160;</td><td class="memItemRight" valign="bottom"><b>ADatabase</b> (const <a class="el" href="class_a_database.html">ADatabase</a> &amp;)=delete</td></tr>
  119. <tr class="separator:aad08b473425d508107bc6c872cb53334"><td class="memSeparator" colspan="2">&#160;</td></tr>
  120. <tr class="memitem:a3c3e1c6b74a9e92f26f7118a6a130a64"><td class="memItemLeft" align="right" valign="top"><a id="a3c3e1c6b74a9e92f26f7118a6a130a64"></a>
  121. void&#160;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="class_a_database.html">ADatabase</a> &amp;)=delete</td></tr>
  122. <tr class="separator:a3c3e1c6b74a9e92f26f7118a6a130a64"><td class="memSeparator" colspan="2">&#160;</td></tr>
  123. <tr class="memitem:a1c026e7784b03fc5822077c7d0071330"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_database.html#a1c026e7784b03fc5822077c7d0071330">dbRevision</a> () const</td></tr>
  124. <tr class="memdesc:a1c026e7784b03fc5822077c7d0071330"><td class="mdescLeft">&#160;</td><td class="mdescRight">dbRevision returns the database Revision Number. The Revision refers to what iteration of the database layout is used. For the sqlite version of the database refer to <a class="el" href="class_a_database.html#a491415273a771dd7ea41452c331a34b0" title="ADatabase::sqliteVersion returns the database sqlite version. See also dbRevision()">sqliteVersion()</a> <a href="class_a_database.html#a1c026e7784b03fc5822077c7d0071330">More...</a><br /></td></tr>
  125. <tr class="separator:a1c026e7784b03fc5822077c7d0071330"><td class="memSeparator" colspan="2">&#160;</td></tr>
  126. <tr class="memitem:a4f0df6cc04e6d9b563db874a989ebc61"><td class="memItemLeft" align="right" valign="top"><a id="a4f0df6cc04e6d9b563db874a989ebc61"></a>
  127. TableNames_T&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_database.html#a4f0df6cc04e6d9b563db874a989ebc61">getTableNames</a> () const</td></tr>
  128. <tr class="memdesc:a4f0df6cc04e6d9b563db874a989ebc61"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the names of all tables in the database. <br /></td></tr>
  129. <tr class="separator:a4f0df6cc04e6d9b563db874a989ebc61"><td class="memSeparator" colspan="2">&#160;</td></tr>
  130. <tr class="memitem:ad977866124a3c7f7184e165c02a68931"><td class="memItemLeft" align="right" valign="top"><a id="ad977866124a3c7f7184e165c02a68931"></a>
  131. ColumnNames_T&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_database.html#ad977866124a3c7f7184e165c02a68931">getTableColumns</a> (TableName_T table_name) const</td></tr>
  132. <tr class="memdesc:ad977866124a3c7f7184e165c02a68931"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the names of a given table in the database. <br /></td></tr>
  133. <tr class="separator:ad977866124a3c7f7184e165c02a68931"><td class="memSeparator" colspan="2">&#160;</td></tr>
  134. <tr class="memitem:a3c0fdc84000ad397d61f0efabd032194"><td class="memItemLeft" align="right" valign="top"><a id="a3c0fdc84000ad397d61f0efabd032194"></a>
  135. void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_database.html#a3c0fdc84000ad397d61f0efabd032194">updateLayout</a> ()</td></tr>
  136. <tr class="memdesc:a3c0fdc84000ad397d61f0efabd032194"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates the member variables tableNames and tableColumns with up-to-date layout information if the database has been altered. This function is normally only required during database setup or maintenance. <br /></td></tr>
  137. <tr class="separator:a3c0fdc84000ad397d61f0efabd032194"><td class="memSeparator" colspan="2">&#160;</td></tr>
  138. <tr class="memitem:a491415273a771dd7ea41452c331a34b0"><td class="memItemLeft" align="right" valign="top">const QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_database.html#a491415273a771dd7ea41452c331a34b0">sqliteVersion</a> () const</td></tr>
  139. <tr class="memdesc:a491415273a771dd7ea41452c331a34b0"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="class_a_database.html#a491415273a771dd7ea41452c331a34b0" title="ADatabase::sqliteVersion returns the database sqlite version. See also dbRevision()">ADatabase::sqliteVersion</a> returns the database sqlite version. See also <a class="el" href="class_a_database.html#a1c026e7784b03fc5822077c7d0071330" title="dbRevision returns the database Revision Number. The Revision refers to what iteration of the databas...">dbRevision()</a> <a href="class_a_database.html#a491415273a771dd7ea41452c331a34b0">More...</a><br /></td></tr>
  140. <tr class="separator:a491415273a771dd7ea41452c331a34b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  141. <tr class="memitem:aa6080200aa3f229251480bc416755fed"><td class="memItemLeft" align="right" valign="top"><a id="aa6080200aa3f229251480bc416755fed"></a>
  142. bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_database.html#aa6080200aa3f229251480bc416755fed">connect</a> ()</td></tr>
  143. <tr class="memdesc:aa6080200aa3f229251480bc416755fed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connect to the database and populate database information. <br /></td></tr>
  144. <tr class="separator:aa6080200aa3f229251480bc416755fed"><td class="memSeparator" colspan="2">&#160;</td></tr>
  145. <tr class="memitem:abc461aaa66304ca638e546f67a694935"><td class="memItemLeft" align="right" valign="top"><a id="abc461aaa66304ca638e546f67a694935"></a>
  146. void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_database.html#abc461aaa66304ca638e546f67a694935">disconnect</a> ()</td></tr>
  147. <tr class="memdesc:abc461aaa66304ca638e546f67a694935"><td class="mdescLeft">&#160;</td><td class="mdescRight">closes the database connection. <br /></td></tr>
  148. <tr class="separator:abc461aaa66304ca638e546f67a694935"><td class="memSeparator" colspan="2">&#160;</td></tr>
  149. <tr class="memitem:a2a43936d3ae28993f9f7eda0fdf4664d"><td class="memItemLeft" align="right" valign="top">QVector&lt; QVariant &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_database.html#a2a43936d3ae28993f9f7eda0fdf4664d">customQuery</a> (QString statement, int return_values)</td></tr>
  150. <tr class="memdesc:a2a43936d3ae28993f9f7eda0fdf4664d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Can be used to send a complex query to the database. <a href="class_a_database.html#a2a43936d3ae28993f9f7eda0fdf4664d">More...</a><br /></td></tr>
  151. <tr class="separator:a2a43936d3ae28993f9f7eda0fdf4664d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  152. <tr class="memitem:a24f938e4c8d20afddb5e5651e041a7a6"><td class="memItemLeft" align="right" valign="top"><a id="a24f938e4c8d20afddb5e5651e041a7a6"></a>
  153. bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_database.html#a24f938e4c8d20afddb5e5651e041a7a6">exists</a> (<a class="el" href="class_a_entry.html">AEntry</a> entry)</td></tr>
  154. <tr class="memdesc:a24f938e4c8d20afddb5e5651e041a7a6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if an entry exists in the database, based on position data. <br /></td></tr>
  155. <tr class="separator:a24f938e4c8d20afddb5e5651e041a7a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
  156. <tr class="memitem:a22ce31ddea49c144d85c05658f49fec5"><td class="memItemLeft" align="right" valign="top"><a id="a22ce31ddea49c144d85c05658f49fec5"></a>
  157. bool&#160;</td><td class="memItemRight" valign="bottom"><b>exists</b> (<a class="el" href="struct_data_position.html">DataPosition</a> data_position)</td></tr>
  158. <tr class="separator:a22ce31ddea49c144d85c05658f49fec5"><td class="memSeparator" colspan="2">&#160;</td></tr>
  159. <tr class="memitem:a652472c747c0ce68940b17c9c23666dd"><td class="memItemLeft" align="right" valign="top"><a id="a652472c747c0ce68940b17c9c23666dd"></a>
  160. bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_database.html#a652472c747c0ce68940b17c9c23666dd">commit</a> (<a class="el" href="class_a_entry.html">AEntry</a> entry)</td></tr>
  161. <tr class="memdesc:a652472c747c0ce68940b17c9c23666dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">commits an entry to the database, calls either insert or update, based on position data <br /></td></tr>
  162. <tr class="separator:a652472c747c0ce68940b17c9c23666dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
  163. <tr class="memitem:a4ecb6d0c9b3813c90b3165c993e69ad5"><td class="memItemLeft" align="right" valign="top"><a id="a4ecb6d0c9b3813c90b3165c993e69ad5"></a>
  164. bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_database.html#a4ecb6d0c9b3813c90b3165c993e69ad5">insert</a> (<a class="el" href="class_a_entry.html">AEntry</a> new_entry)</td></tr>
  165. <tr class="memdesc:a4ecb6d0c9b3813c90b3165c993e69ad5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create new entry in the databse based on UserInput. <br /></td></tr>
  166. <tr class="separator:a4ecb6d0c9b3813c90b3165c993e69ad5"><td class="memSeparator" colspan="2">&#160;</td></tr>
  167. <tr class="memitem:a910bc0c1717e9301911343c082aa1aaa"><td class="memItemLeft" align="right" valign="top"><a id="a910bc0c1717e9301911343c082aa1aaa"></a>
  168. bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_database.html#a910bc0c1717e9301911343c082aa1aaa">update</a> (<a class="el" href="class_a_entry.html">AEntry</a> updated_entry)</td></tr>
  169. <tr class="memdesc:a910bc0c1717e9301911343c082aa1aaa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates entry in database from existing entry tweaked by the user. <br /></td></tr>
  170. <tr class="separator:a910bc0c1717e9301911343c082aa1aaa"><td class="memSeparator" colspan="2">&#160;</td></tr>
  171. <tr class="memitem:a4903909a28daed708e1a335d3be4f57b"><td class="memItemLeft" align="right" valign="top"><a id="a4903909a28daed708e1a335d3be4f57b"></a>
  172. bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_database.html#a4903909a28daed708e1a335d3be4f57b">remove</a> (<a class="el" href="class_a_entry.html">AEntry</a> entry)</td></tr>
  173. <tr class="memdesc:a4903909a28daed708e1a335d3be4f57b"><td class="mdescLeft">&#160;</td><td class="mdescRight">deletes an entry from the database. <br /></td></tr>
  174. <tr class="separator:a4903909a28daed708e1a335d3be4f57b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  175. <tr class="memitem:a863d30e9e3a7c14adfe72787363618c8"><td class="memItemLeft" align="right" valign="top"><a id="a863d30e9e3a7c14adfe72787363618c8"></a>
  176. bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_database.html#a863d30e9e3a7c14adfe72787363618c8">removeMany</a> (QList&lt; <a class="el" href="struct_data_position.html">DataPosition</a> &gt;)</td></tr>
  177. <tr class="memdesc:a863d30e9e3a7c14adfe72787363618c8"><td class="mdescLeft">&#160;</td><td class="mdescRight">deletes a list of entries from the database. Optimised for speed when deleting many entries. <br /></td></tr>
  178. <tr class="separator:a863d30e9e3a7c14adfe72787363618c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
  179. <tr class="memitem:afc39f6136fc822e0649964fa22b84bf9"><td class="memItemLeft" align="right" valign="top"><a id="afc39f6136fc822e0649964fa22b84bf9"></a>
  180. RowData_T&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_database.html#afc39f6136fc822e0649964fa22b84bf9">getEntryData</a> (<a class="el" href="struct_data_position.html">DataPosition</a> data_position)</td></tr>
  181. <tr class="memdesc:afc39f6136fc822e0649964fa22b84bf9"><td class="mdescLeft">&#160;</td><td class="mdescRight">retreive entry data from the database to create an entry object <br /></td></tr>
  182. <tr class="separator:afc39f6136fc822e0649964fa22b84bf9"><td class="memSeparator" colspan="2">&#160;</td></tr>
  183. <tr class="memitem:a8959b406b97d9520981890d92850b1ba"><td class="memItemLeft" align="right" valign="top"><a id="a8959b406b97d9520981890d92850b1ba"></a>
  184. <a class="el" href="class_a_entry.html">AEntry</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_database.html#a8959b406b97d9520981890d92850b1ba">getEntry</a> (<a class="el" href="struct_data_position.html">DataPosition</a> data_position)</td></tr>
  185. <tr class="memdesc:a8959b406b97d9520981890d92850b1ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">retreive an Entry from the database. <br /></td></tr>
  186. <tr class="separator:a8959b406b97d9520981890d92850b1ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
  187. <tr class="memitem:a426026d641a594863995ec5db8312259"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_a_pilot_entry.html">APilotEntry</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_database.html#a426026d641a594863995ec5db8312259">getPilotEntry</a> (RowId_T row_id)</td></tr>
  188. <tr class="memdesc:a426026d641a594863995ec5db8312259"><td class="mdescLeft">&#160;</td><td class="mdescRight">retreives a PilotEntry from the database. <a href="class_a_database.html#a426026d641a594863995ec5db8312259">More...</a><br /></td></tr>
  189. <tr class="separator:a426026d641a594863995ec5db8312259"><td class="memSeparator" colspan="2">&#160;</td></tr>
  190. <tr class="memitem:a356df159542705635dc3898d90682039"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_a_tail_entry.html">ATailEntry</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_database.html#a356df159542705635dc3898d90682039">getTailEntry</a> (RowId_T row_id)</td></tr>
  191. <tr class="memdesc:a356df159542705635dc3898d90682039"><td class="mdescLeft">&#160;</td><td class="mdescRight">retreives a TailEntry from the database. <a href="class_a_database.html#a356df159542705635dc3898d90682039">More...</a><br /></td></tr>
  192. <tr class="separator:a356df159542705635dc3898d90682039"><td class="memSeparator" colspan="2">&#160;</td></tr>
  193. <tr class="memitem:ae0a3c9273431195df6295b9da24b3a3a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_a_aircraft_entry.html">AAircraftEntry</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_database.html#ae0a3c9273431195df6295b9da24b3a3a">getAircraftEntry</a> (RowId_T row_id)</td></tr>
  194. <tr class="memdesc:ae0a3c9273431195df6295b9da24b3a3a"><td class="mdescLeft">&#160;</td><td class="mdescRight">retreives a TailEntry from the database. <a href="class_a_database.html#ae0a3c9273431195df6295b9da24b3a3a">More...</a><br /></td></tr>
  195. <tr class="separator:ae0a3c9273431195df6295b9da24b3a3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  196. <tr class="memitem:a7bb44738362582e4f54f68e3aa30d40a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_a_flight_entry.html">AFlightEntry</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_database.html#a7bb44738362582e4f54f68e3aa30d40a">getFlightEntry</a> (RowId_T row_id)</td></tr>
  197. <tr class="memdesc:a7bb44738362582e4f54f68e3aa30d40a"><td class="mdescLeft">&#160;</td><td class="mdescRight">retreives a flight entry from the database. <a href="class_a_database.html#a7bb44738362582e4f54f68e3aa30d40a">More...</a><br /></td></tr>
  198. <tr class="separator:a7bb44738362582e4f54f68e3aa30d40a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  199. <tr class="memitem:a5abdf1f35468f788609252c7a3be7bc4"><td class="memItemLeft" align="right" valign="top"><a id="a5abdf1f35468f788609252c7a3be7bc4"></a>
  200. <a class="el" href="struct_a_currency_entry.html">ACurrencyEntry</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_database.html#a5abdf1f35468f788609252c7a3be7bc4">getCurrencyEntry</a> (ACurrencyEntry::CurrencyName currency_name)</td></tr>
  201. <tr class="memdesc:a5abdf1f35468f788609252c7a3be7bc4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retreives a currency entry from the database. <br /></td></tr>
  202. <tr class="separator:a5abdf1f35468f788609252c7a3be7bc4"><td class="memSeparator" colspan="2">&#160;</td></tr>
  203. <tr class="memitem:a89de409c1828125363f46f384df47359"><td class="memItemLeft" align="right" valign="top"><a id="a89de409c1828125363f46f384df47359"></a>
  204. const QStringList&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_database.html#a89de409c1828125363f46f384df47359">getCompletionList</a> (ADatabaseTarget target)</td></tr>
  205. <tr class="memdesc:a89de409c1828125363f46f384df47359"><td class="mdescLeft">&#160;</td><td class="mdescRight">getCompletionList returns a QStringList of values for a QCompleter based on database values <br /></td></tr>
  206. <tr class="separator:a89de409c1828125363f46f384df47359"><td class="memSeparator" colspan="2">&#160;</td></tr>
  207. <tr class="memitem:a5dba46567089112b28b16aaf985af0ba"><td class="memItemLeft" align="right" valign="top">const QMap&lt; QString, RowId_T &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_database.html#a5dba46567089112b28b16aaf985af0ba">getIdMap</a> (ADatabaseTarget target)</td></tr>
  208. <tr class="memdesc:a5dba46567089112b28b16aaf985af0ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns a QMap&lt;QString, RowId_t&gt; of a human-readable database value and its row id. Used in the Dialogs to map user input to unique database entries. <a href="class_a_database.html#a5dba46567089112b28b16aaf985af0ba">More...</a><br /></td></tr>
  209. <tr class="separator:a5dba46567089112b28b16aaf985af0ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
  210. <tr class="memitem:a264fea56cd3fbc31463c587f196ce576"><td class="memItemLeft" align="right" valign="top"><a id="a264fea56cd3fbc31463c587f196ce576"></a>
  211. int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_database.html#a264fea56cd3fbc31463c587f196ce576">getLastEntry</a> (ADatabaseTarget target)</td></tr>
  212. <tr class="memdesc:a264fea56cd3fbc31463c587f196ce576"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns the ROWID for the newest entry in the respective database. <br /></td></tr>
  213. <tr class="separator:a264fea56cd3fbc31463c587f196ce576"><td class="memSeparator" colspan="2">&#160;</td></tr>
  214. <tr class="memitem:a6006c47c82b2c72f7ab6b5cc319c5fbf"><td class="memItemLeft" align="right" valign="top"><a id="a6006c47c82b2c72f7ab6b5cc319c5fbf"></a>
  215. QList&lt; RowId_T &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_database.html#a6006c47c82b2c72f7ab6b5cc319c5fbf">getForeignKeyConstraints</a> (RowId_T foreign_row_id, ADatabaseTarget target)</td></tr>
  216. <tr class="memdesc:a6006c47c82b2c72f7ab6b5cc319c5fbf"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns a list of ROWID's in the flights table for which foreign key constraints exist. <br /></td></tr>
  217. <tr class="separator:a6006c47c82b2c72f7ab6b5cc319c5fbf"><td class="memSeparator" colspan="2">&#160;</td></tr>
  218. <tr class="memitem:a4640a4348dad468a0ff65bad05b07227"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_a_pilot_entry.html">APilotEntry</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_database.html#a4640a4348dad468a0ff65bad05b07227">resolveForeignPilot</a> (RowId_T foreign_key)</td></tr>
  219. <tr class="memdesc:a4640a4348dad468a0ff65bad05b07227"><td class="mdescLeft">&#160;</td><td class="mdescRight">Resolves the foreign key in a flight entry. <a href="class_a_database.html#a4640a4348dad468a0ff65bad05b07227">More...</a><br /></td></tr>
  220. <tr class="separator:a4640a4348dad468a0ff65bad05b07227"><td class="memSeparator" colspan="2">&#160;</td></tr>
  221. <tr class="memitem:a5878bcd4bc19e4c3fc5275ca7252860d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_a_tail_entry.html">ATailEntry</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_database.html#a5878bcd4bc19e4c3fc5275ca7252860d">resolveForeignTail</a> (RowId_T foreign_key)</td></tr>
  222. <tr class="memdesc:a5878bcd4bc19e4c3fc5275ca7252860d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Resolves the foreign key in a flight entry. <a href="class_a_database.html#a5878bcd4bc19e4c3fc5275ca7252860d">More...</a><br /></td></tr>
  223. <tr class="separator:a5878bcd4bc19e4c3fc5275ca7252860d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  224. <tr class="memitem:a56baf4eaf25922030f3cfa6906963f7c"><td class="memItemLeft" align="right" valign="top">QMap&lt; ADatabaseSummaryKey, QString &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_database.html#a56baf4eaf25922030f3cfa6906963f7c">databaseSummary</a> (const QString &amp;db_path)</td></tr>
  225. <tr class="memdesc:a56baf4eaf25922030f3cfa6906963f7c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return a summary of a database. <a href="class_a_database.html#a56baf4eaf25922030f3cfa6906963f7c">More...</a><br /></td></tr>
  226. <tr class="separator:a56baf4eaf25922030f3cfa6906963f7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  227. <tr class="memitem:a2c54b7506faf0f15f5323ed53ff12099"><td class="memItemLeft" align="right" valign="top"><a id="a2c54b7506faf0f15f5323ed53ff12099"></a>
  228. const QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_database.html#a2c54b7506faf0f15f5323ed53ff12099">databaseSummaryString</a> (const QString &amp;db_path)</td></tr>
  229. <tr class="memdesc:a2c54b7506faf0f15f5323ed53ff12099"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns a short summary string of the database, containing total time and date of last flight. <br /></td></tr>
  230. <tr class="separator:a2c54b7506faf0f15f5323ed53ff12099"><td class="memSeparator" colspan="2">&#160;</td></tr>
  231. <tr class="memitem:a0bda52064f005f1463e56b60cd23b164"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_database.html#a0bda52064f005f1463e56b60cd23b164">restoreBackup</a> (const QString &amp;backup_file)</td></tr>
  232. <tr class="memdesc:a0bda52064f005f1463e56b60cd23b164"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="class_a_database.html#a0bda52064f005f1463e56b60cd23b164" title="ADatabase::restoreBackup restores the database from a given backup file and replaces the currently ac...">ADatabase::restoreBackup</a> restores the database from a given backup file and replaces the currently active database. <a href="class_a_database.html#a0bda52064f005f1463e56b60cd23b164">More...</a><br /></td></tr>
  233. <tr class="separator:a0bda52064f005f1463e56b60cd23b164"><td class="memSeparator" colspan="2">&#160;</td></tr>
  234. <tr class="memitem:a5ab838a62a83974f9e40c62f66adfa99"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_database.html#a5ab838a62a83974f9e40c62f66adfa99">createBackup</a> (const QString &amp;dest_file)</td></tr>
  235. <tr class="memdesc:a5ab838a62a83974f9e40c62f66adfa99"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="class_a_database.html#a5ab838a62a83974f9e40c62f66adfa99" title="ADatabase::createBackup copies the currently used database to an external backup location provided by...">ADatabase::createBackup</a> copies the currently used database to an external backup location provided by the user. <a href="class_a_database.html#a5ab838a62a83974f9e40c62f66adfa99">More...</a><br /></td></tr>
  236. <tr class="separator:a5ab838a62a83974f9e40c62f66adfa99"><td class="memSeparator" colspan="2">&#160;</td></tr>
  237. </table><table class="memberdecls">
  238. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
  239. Static Public Member Functions</h2></td></tr>
  240. <tr class="memitem:ad4f5ba05c99e7eb5eec75ba913f1fc00"><td class="memItemLeft" align="right" valign="top"><a id="ad4f5ba05c99e7eb5eec75ba913f1fc00"></a>
  241. static <a class="el" href="class_a_database.html">ADatabase</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>instance</b> ()</td></tr>
  242. <tr class="separator:ad4f5ba05c99e7eb5eec75ba913f1fc00"><td class="memSeparator" colspan="2">&#160;</td></tr>
  243. <tr class="memitem:a2379c9da900da8e96add932e4024389a"><td class="memItemLeft" align="right" valign="top">static QSqlDatabase&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_database.html#a2379c9da900da8e96add932e4024389a">database</a> ()</td></tr>
  244. <tr class="memdesc:a2379c9da900da8e96add932e4024389a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Can be used to access the database connection. <a href="class_a_database.html#a2379c9da900da8e96add932e4024389a">More...</a><br /></td></tr>
  245. <tr class="separator:a2379c9da900da8e96add932e4024389a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  246. </table><table class="memberdecls">
  247. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
  248. Public Attributes</h2></td></tr>
  249. <tr class="memitem:a95d05441d87fa291acb96e37b029409e"><td class="memItemLeft" align="right" valign="top"><a id="a95d05441d87fa291acb96e37b029409e"></a>
  250. <a class="el" href="class_a_database_error.html">ADatabaseError</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_database.html#a95d05441d87fa291acb96e37b029409e">lastError</a></td></tr>
  251. <tr class="memdesc:a95d05441d87fa291acb96e37b029409e"><td class="mdescLeft">&#160;</td><td class="mdescRight">lastError extends QSqlError. Holds information about the last error that ocurred during a SQL operation. <br /></td></tr>
  252. <tr class="separator:a95d05441d87fa291acb96e37b029409e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  253. <tr class="memitem:ae1da0311f588fd269dec80389aea8644"><td class="memItemLeft" align="right" valign="top"><a id="ae1da0311f588fd269dec80389aea8644"></a>
  254. const QFileInfo&#160;</td><td class="memItemRight" valign="bottom"><b>databaseFile</b></td></tr>
  255. <tr class="separator:ae1da0311f588fd269dec80389aea8644"><td class="memSeparator" colspan="2">&#160;</td></tr>
  256. </table>
  257. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  258. <div class="textblock"><p>The DB class encapsulates the SQL database by providing fast access to hot database data. </p>
  259. </div><h2 class="groupheader">Member Function Documentation</h2>
  260. <a id="a5ab838a62a83974f9e40c62f66adfa99"></a>
  261. <h2 class="memtitle"><span class="permalink"><a href="#a5ab838a62a83974f9e40c62f66adfa99">&#9670;&nbsp;</a></span>createBackup()</h2>
  262. <div class="memitem">
  263. <div class="memproto">
  264. <table class="memname">
  265. <tr>
  266. <td class="memname">bool ADatabase::createBackup </td>
  267. <td>(</td>
  268. <td class="paramtype">const QString &amp;&#160;</td>
  269. <td class="paramname"><em>dest_file</em></td><td>)</td>
  270. <td></td>
  271. </tr>
  272. </table>
  273. </div><div class="memdoc">
  274. <p><a class="el" href="class_a_database.html#a5ab838a62a83974f9e40c62f66adfa99" title="ADatabase::createBackup copies the currently used database to an external backup location provided by...">ADatabase::createBackup</a> copies the currently used database to an external backup location provided by the user. </p>
  275. <dl class="params"><dt>Parameters</dt><dd>
  276. <table class="params">
  277. <tr><td class="paramname">dest_file</td><td>This is the full path and filename of where the backup will be created, e.g. 'home/Sully/myBackups/backupFromOpl.db' </td></tr>
  278. </table>
  279. </dd>
  280. </dl>
  281. </div>
  282. </div>
  283. <a id="a2a43936d3ae28993f9f7eda0fdf4664d"></a>
  284. <h2 class="memtitle"><span class="permalink"><a href="#a2a43936d3ae28993f9f7eda0fdf4664d">&#9670;&nbsp;</a></span>customQuery()</h2>
  285. <div class="memitem">
  286. <div class="memproto">
  287. <table class="memname">
  288. <tr>
  289. <td class="memname">QVector&lt; QVariant &gt; ADatabase::customQuery </td>
  290. <td>(</td>
  291. <td class="paramtype">QString&#160;</td>
  292. <td class="paramname"><em>statement</em>, </td>
  293. </tr>
  294. <tr>
  295. <td class="paramkey"></td>
  296. <td></td>
  297. <td class="paramtype">int&#160;</td>
  298. <td class="paramname"><em>return_values</em>&#160;</td>
  299. </tr>
  300. <tr>
  301. <td></td>
  302. <td>)</td>
  303. <td></td><td></td>
  304. </tr>
  305. </table>
  306. </div><div class="memdoc">
  307. <p>Can be used to send a complex query to the database. </p>
  308. <dl class="params"><dt>Parameters</dt><dd>
  309. <table class="params">
  310. <tr><td class="paramname">query</td><td>- the full sql query statement </td></tr>
  311. <tr><td class="paramname">returnValues</td><td>- the number of return values </td></tr>
  312. </table>
  313. </dd>
  314. </dl>
  315. </div>
  316. </div>
  317. <a id="a2379c9da900da8e96add932e4024389a"></a>
  318. <h2 class="memtitle"><span class="permalink"><a href="#a2379c9da900da8e96add932e4024389a">&#9670;&nbsp;</a></span>database()</h2>
  319. <div class="memitem">
  320. <div class="memproto">
  321. <table class="mlabels">
  322. <tr>
  323. <td class="mlabels-left">
  324. <table class="memname">
  325. <tr>
  326. <td class="memname">QSqlDatabase ADatabase::database </td>
  327. <td>(</td>
  328. <td class="paramname"></td><td>)</td>
  329. <td></td>
  330. </tr>
  331. </table>
  332. </td>
  333. <td class="mlabels-right">
  334. <span class="mlabels"><span class="mlabel">static</span></span> </td>
  335. </tr>
  336. </table>
  337. </div><div class="memdoc">
  338. <p>Can be used to access the database connection. </p>
  339. <dl class="section return"><dt>Returns</dt><dd>The QSqlDatabase object pertaining to the connection. </dd></dl>
  340. </div>
  341. </div>
  342. <a id="a56baf4eaf25922030f3cfa6906963f7c"></a>
  343. <h2 class="memtitle"><span class="permalink"><a href="#a56baf4eaf25922030f3cfa6906963f7c">&#9670;&nbsp;</a></span>databaseSummary()</h2>
  344. <div class="memitem">
  345. <div class="memproto">
  346. <table class="memname">
  347. <tr>
  348. <td class="memname">QMap&lt; ADatabaseSummaryKey, QString &gt; ADatabase::databaseSummary </td>
  349. <td>(</td>
  350. <td class="paramtype">const QString &amp;&#160;</td>
  351. <td class="paramname"><em>db_path</em></td><td>)</td>
  352. <td></td>
  353. </tr>
  354. </table>
  355. </div><div class="memdoc">
  356. <p>Return a summary of a database. </p>
  357. <p>Creates a summary of the database giving a quick overview of the relevant contents. The function runs several specialised SQL queries to create a QMap&lt;ADatabaseSummaryKey, QString&gt; containing Total Flight Time, Number of unique aircraft and pilots, as well as the date of last flight. Uses a temporary database connection separate from the default connection in order to not tamper with the currently active database connection. </p>
  358. </div>
  359. </div>
  360. <a id="a1c026e7784b03fc5822077c7d0071330"></a>
  361. <h2 class="memtitle"><span class="permalink"><a href="#a1c026e7784b03fc5822077c7d0071330">&#9670;&nbsp;</a></span>dbRevision()</h2>
  362. <div class="memitem">
  363. <div class="memproto">
  364. <table class="memname">
  365. <tr>
  366. <td class="memname">int ADatabase::dbRevision </td>
  367. <td>(</td>
  368. <td class="paramname"></td><td>)</td>
  369. <td> const</td>
  370. </tr>
  371. </table>
  372. </div><div class="memdoc">
  373. <p>dbRevision returns the database Revision Number. The Revision refers to what iteration of the database layout is used. For the sqlite version of the database refer to <a class="el" href="class_a_database.html#a491415273a771dd7ea41452c331a34b0" title="ADatabase::sqliteVersion returns the database sqlite version. See also dbRevision()">sqliteVersion()</a> </p>
  374. <dl class="section return"><dt>Returns</dt><dd></dd></dl>
  375. </div>
  376. </div>
  377. <a id="ae0a3c9273431195df6295b9da24b3a3a"></a>
  378. <h2 class="memtitle"><span class="permalink"><a href="#ae0a3c9273431195df6295b9da24b3a3a">&#9670;&nbsp;</a></span>getAircraftEntry()</h2>
  379. <div class="memitem">
  380. <div class="memproto">
  381. <table class="memname">
  382. <tr>
  383. <td class="memname"><a class="el" href="struct_a_aircraft_entry.html">AAircraftEntry</a> ADatabase::getAircraftEntry </td>
  384. <td>(</td>
  385. <td class="paramtype">RowId_T&#160;</td>
  386. <td class="paramname"><em>row_id</em></td><td>)</td>
  387. <td></td>
  388. </tr>
  389. </table>
  390. </div><div class="memdoc">
  391. <p>retreives a TailEntry from the database. </p>
  392. <p>This function is a wrapper for DataBase::getEntry(DataPosition), where the table is already set and which returns an <a class="el" href="struct_a_aircraft_entry.html">AAircraftEntry</a> instead of an <a class="el" href="class_a_entry.html" title="The Entry class encapsulates table metadata(table name, row id) and data for new and existing entries...">AEntry</a>. It allows for easy access to an aircraft entry with only the RowId required as input. </p>
  393. </div>
  394. </div>
  395. <a id="a7bb44738362582e4f54f68e3aa30d40a"></a>
  396. <h2 class="memtitle"><span class="permalink"><a href="#a7bb44738362582e4f54f68e3aa30d40a">&#9670;&nbsp;</a></span>getFlightEntry()</h2>
  397. <div class="memitem">
  398. <div class="memproto">
  399. <table class="memname">
  400. <tr>
  401. <td class="memname"><a class="el" href="class_a_flight_entry.html">AFlightEntry</a> ADatabase::getFlightEntry </td>
  402. <td>(</td>
  403. <td class="paramtype">RowId_T&#160;</td>
  404. <td class="paramname"><em>row_id</em></td><td>)</td>
  405. <td></td>
  406. </tr>
  407. </table>
  408. </div><div class="memdoc">
  409. <p>retreives a flight entry from the database. </p>
  410. <p>This function is a wrapper for DataBase::getEntry(DataPosition), where the table is already set and which returns an <a class="el" href="class_a_flight_entry.html">AFlightEntry</a> instead of an <a class="el" href="class_a_entry.html" title="The Entry class encapsulates table metadata(table name, row id) and data for new and existing entries...">AEntry</a>. It allows for easy access to a flight entry with only the RowId required as input. </p>
  411. </div>
  412. </div>
  413. <a id="a5dba46567089112b28b16aaf985af0ba"></a>
  414. <h2 class="memtitle"><span class="permalink"><a href="#a5dba46567089112b28b16aaf985af0ba">&#9670;&nbsp;</a></span>getIdMap()</h2>
  415. <div class="memitem">
  416. <div class="memproto">
  417. <table class="memname">
  418. <tr>
  419. <td class="memname">const QMap&lt; QString, RowId_T &gt; ADatabase::getIdMap </td>
  420. <td>(</td>
  421. <td class="paramtype">ADatabaseTarget&#160;</td>
  422. <td class="paramname"><em>target</em></td><td>)</td>
  423. <td></td>
  424. </tr>
  425. </table>
  426. </div><div class="memdoc">
  427. <p>returns a QMap&lt;QString, RowId_t&gt; of a human-readable database value and its row id. Used in the Dialogs to map user input to unique database entries. </p>
  428. <dl class="todo"><dt><b><a class="el" href="todo.html#_todo000001">Todo:</a></b></dt><dd>What is this QString semantically? As i understand its a "QueryResult" QVariant cast to QString </dd></dl>
  429. </div>
  430. </div>
  431. <a id="a426026d641a594863995ec5db8312259"></a>
  432. <h2 class="memtitle"><span class="permalink"><a href="#a426026d641a594863995ec5db8312259">&#9670;&nbsp;</a></span>getPilotEntry()</h2>
  433. <div class="memitem">
  434. <div class="memproto">
  435. <table class="memname">
  436. <tr>
  437. <td class="memname"><a class="el" href="struct_a_pilot_entry.html">APilotEntry</a> ADatabase::getPilotEntry </td>
  438. <td>(</td>
  439. <td class="paramtype">RowId_T&#160;</td>
  440. <td class="paramname"><em>row_id</em></td><td>)</td>
  441. <td></td>
  442. </tr>
  443. </table>
  444. </div><div class="memdoc">
  445. <p>retreives a PilotEntry from the database. </p>
  446. <p>This function is a wrapper for DataBase::getEntry(DataPosition), where the table is already set and which returns a PilotEntry instead of an Entry. It allows for easy access to a pilot entry with only the RowId required as input. </p>
  447. </div>
  448. </div>
  449. <a id="a356df159542705635dc3898d90682039"></a>
  450. <h2 class="memtitle"><span class="permalink"><a href="#a356df159542705635dc3898d90682039">&#9670;&nbsp;</a></span>getTailEntry()</h2>
  451. <div class="memitem">
  452. <div class="memproto">
  453. <table class="memname">
  454. <tr>
  455. <td class="memname"><a class="el" href="struct_a_tail_entry.html">ATailEntry</a> ADatabase::getTailEntry </td>
  456. <td>(</td>
  457. <td class="paramtype">RowId_T&#160;</td>
  458. <td class="paramname"><em>row_id</em></td><td>)</td>
  459. <td></td>
  460. </tr>
  461. </table>
  462. </div><div class="memdoc">
  463. <p>retreives a TailEntry from the database. </p>
  464. <p>This function is a wrapper for DataBase::getEntry(DataPosition), where the table is already set and which returns a TailEntry instead of an Entry. It allows for easy access to a tail entry with only the RowId required as input. </p>
  465. </div>
  466. </div>
  467. <a id="a4640a4348dad468a0ff65bad05b07227"></a>
  468. <h2 class="memtitle"><span class="permalink"><a href="#a4640a4348dad468a0ff65bad05b07227">&#9670;&nbsp;</a></span>resolveForeignPilot()</h2>
  469. <div class="memitem">
  470. <div class="memproto">
  471. <table class="memname">
  472. <tr>
  473. <td class="memname"><a class="el" href="struct_a_pilot_entry.html">APilotEntry</a> ADatabase::resolveForeignPilot </td>
  474. <td>(</td>
  475. <td class="paramtype">RowId_T&#160;</td>
  476. <td class="paramname"><em>foreign_key</em></td><td>)</td>
  477. <td></td>
  478. </tr>
  479. </table>
  480. </div><div class="memdoc">
  481. <p>Resolves the foreign key in a flight entry. </p>
  482. <dl class="section return"><dt>Returns</dt><dd>The Pilot Entry referencted by the foreign key. </dd></dl>
  483. </div>
  484. </div>
  485. <a id="a5878bcd4bc19e4c3fc5275ca7252860d"></a>
  486. <h2 class="memtitle"><span class="permalink"><a href="#a5878bcd4bc19e4c3fc5275ca7252860d">&#9670;&nbsp;</a></span>resolveForeignTail()</h2>
  487. <div class="memitem">
  488. <div class="memproto">
  489. <table class="memname">
  490. <tr>
  491. <td class="memname"><a class="el" href="struct_a_tail_entry.html">ATailEntry</a> ADatabase::resolveForeignTail </td>
  492. <td>(</td>
  493. <td class="paramtype">RowId_T&#160;</td>
  494. <td class="paramname"><em>foreign_key</em></td><td>)</td>
  495. <td></td>
  496. </tr>
  497. </table>
  498. </div><div class="memdoc">
  499. <p>Resolves the foreign key in a flight entry. </p>
  500. <dl class="section return"><dt>Returns</dt><dd>The Tail Entry referencted by the foreign key. </dd></dl>
  501. </div>
  502. </div>
  503. <a id="a0bda52064f005f1463e56b60cd23b164"></a>
  504. <h2 class="memtitle"><span class="permalink"><a href="#a0bda52064f005f1463e56b60cd23b164">&#9670;&nbsp;</a></span>restoreBackup()</h2>
  505. <div class="memitem">
  506. <div class="memproto">
  507. <table class="memname">
  508. <tr>
  509. <td class="memname">bool ADatabase::restoreBackup </td>
  510. <td>(</td>
  511. <td class="paramtype">const QString &amp;&#160;</td>
  512. <td class="paramname"><em>backup_file</em></td><td>)</td>
  513. <td></td>
  514. </tr>
  515. </table>
  516. </div><div class="memdoc">
  517. <p><a class="el" href="class_a_database.html#a0bda52064f005f1463e56b60cd23b164" title="ADatabase::restoreBackup restores the database from a given backup file and replaces the currently ac...">ADatabase::restoreBackup</a> restores the database from a given backup file and replaces the currently active database. </p>
  518. <dl class="params"><dt>Parameters</dt><dd>
  519. <table class="params">
  520. <tr><td class="paramname">backup_file</td><td>This is the full path and filename of the backup, e.g. 'home/Sully/myBackups/backupFromOpl.db' </td></tr>
  521. </table>
  522. </dd>
  523. </dl>
  524. </div>
  525. </div>
  526. <a id="a491415273a771dd7ea41452c331a34b0"></a>
  527. <h2 class="memtitle"><span class="permalink"><a href="#a491415273a771dd7ea41452c331a34b0">&#9670;&nbsp;</a></span>sqliteVersion()</h2>
  528. <div class="memitem">
  529. <div class="memproto">
  530. <table class="memname">
  531. <tr>
  532. <td class="memname">const QString ADatabase::sqliteVersion </td>
  533. <td>(</td>
  534. <td class="paramname"></td><td>)</td>
  535. <td> const</td>
  536. </tr>
  537. </table>
  538. </div><div class="memdoc">
  539. <p><a class="el" href="class_a_database.html#a491415273a771dd7ea41452c331a34b0" title="ADatabase::sqliteVersion returns the database sqlite version. See also dbRevision()">ADatabase::sqliteVersion</a> returns the database sqlite version. See also <a class="el" href="class_a_database.html#a1c026e7784b03fc5822077c7d0071330" title="dbRevision returns the database Revision Number. The Revision refers to what iteration of the databas...">dbRevision()</a> </p>
  540. <dl class="section return"><dt>Returns</dt><dd>sqlite version string </dd></dl>
  541. </div>
  542. </div>
  543. <hr/>The documentation for this class was generated from the following files:<ul>
  544. <li>src/database/<a class="el" href="adatabase_8h_source.html">adatabase.h</a></li>
  545. <li>src/database/adatabase.cpp</li>
  546. </ul>
  547. </div><!-- contents -->
  548. </div><!-- doc-content -->
  549. <!-- start footer part -->
  550. <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  551. <ul>
  552. <li class="navelem"><a class="el" href="class_a_database.html">ADatabase</a></li>
  553. <li class="footer">Generated by
  554. <a href="http://www.doxygen.org/index.html">
  555. <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
  556. </ul>
  557. </div>
  558. </body>
  559. </html>