2
0

classexperimental_1_1_a_database.html 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  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.20"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>openPilotLog: experimental::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="projectalign" style="padding-left: 0.5em;">
  29. <div id="projectname">openPilotLog
  30. </div>
  31. </td>
  32. </tr>
  33. </tbody>
  34. </table>
  35. </div>
  36. <!-- end header part -->
  37. <!-- Generated by Doxygen 1.8.20 -->
  38. <script type="text/javascript">
  39. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  40. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  41. /* @license-end */
  42. </script>
  43. <script type="text/javascript" src="menudata.js"></script>
  44. <script type="text/javascript" src="menu.js"></script>
  45. <script type="text/javascript">
  46. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  47. $(function() {
  48. initMenu('',true,false,'search.php','Search');
  49. $(document).ready(function() { init_search(); });
  50. });
  51. /* @license-end */</script>
  52. <div id="main-nav"></div>
  53. </div><!-- top -->
  54. <div id="side-nav" class="ui-resizable side-nav-resizable">
  55. <div id="nav-tree">
  56. <div id="nav-tree-contents">
  57. <div id="nav-sync" class="sync"></div>
  58. </div>
  59. </div>
  60. <div id="splitbar" style="-moz-user-select:none;"
  61. class="ui-resizable-handle">
  62. </div>
  63. </div>
  64. <script type="text/javascript">
  65. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  66. $(document).ready(function(){initNavTree('classexperimental_1_1_a_database.html',''); initResizable(); });
  67. /* @license-end */
  68. </script>
  69. <div id="doc-content">
  70. <!-- window showing the filter options -->
  71. <div id="MSearchSelectWindow"
  72. onmouseover="return searchBox.OnSearchSelectShow()"
  73. onmouseout="return searchBox.OnSearchSelectHide()"
  74. onkeydown="return searchBox.OnSearchSelectKey(event)">
  75. </div>
  76. <!-- iframe showing the search results (closed by default) -->
  77. <div id="MSearchResultsWindow">
  78. <iframe src="javascript:void(0)" frameborder="0"
  79. name="MSearchResults" id="MSearchResults">
  80. </iframe>
  81. </div>
  82. <div class="header">
  83. <div class="summary">
  84. <a href="#signals">Signals</a> &#124;
  85. <a href="#pub-methods">Public Member Functions</a> &#124;
  86. <a href="#pub-static-methods">Static Public Member Functions</a> &#124;
  87. <a href="#pub-attribs">Public Attributes</a> &#124;
  88. <a href="classexperimental_1_1_a_database-members.html">List of all members</a> </div>
  89. <div class="headertitle">
  90. <div class="title">experimental::ADatabase Class Reference</div> </div>
  91. </div><!--header-->
  92. <div class="contents">
  93. <p>The DB class encapsulates the SQL database by providing fast access to hot database data.
  94. <a href="classexperimental_1_1_a_database.html#details">More...</a></p>
  95. <p><code>#include &lt;<a class="el" href="adatabase_8h_source.html">adatabase.h</a>&gt;</code></p>
  96. <div class="dynheader">
  97. Inheritance diagram for experimental::ADatabase:</div>
  98. <div class="dyncontent">
  99. <div class="center">
  100. <img src="classexperimental_1_1_a_database.png" alt=""/>
  101. </div></div>
  102. <table class="memberdecls">
  103. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="signals"></a>
  104. Signals</h2></td></tr>
  105. <tr class="memitem:a202981d0d39b5b3dbc88af65e17ed42a"><td class="memItemLeft" align="right" valign="top"><a id="a202981d0d39b5b3dbc88af65e17ed42a"></a>
  106. void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classexperimental_1_1_a_database.html#a202981d0d39b5b3dbc88af65e17ed42a">dataBaseUpdated</a> ()</td></tr>
  107. <tr class="memdesc:a202981d0d39b5b3dbc88af65e17ed42a"><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>
  108. <tr class="separator:a202981d0d39b5b3dbc88af65e17ed42a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  109. </table><table class="memberdecls">
  110. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  111. Public Member Functions</h2></td></tr>
  112. <tr class="memitem:ad584737b6e8908efbe8c9d38bd350cec"><td class="memItemLeft" align="right" valign="top"><a id="ad584737b6e8908efbe8c9d38bd350cec"></a>
  113. &#160;</td><td class="memItemRight" valign="bottom"><b>ADatabase</b> (const <a class="el" href="classexperimental_1_1_a_database.html">ADatabase</a> &amp;)=delete</td></tr>
  114. <tr class="separator:ad584737b6e8908efbe8c9d38bd350cec"><td class="memSeparator" colspan="2">&#160;</td></tr>
  115. <tr class="memitem:a4b52c04cea57491d61624fd2213ea7e4"><td class="memItemLeft" align="right" valign="top"><a id="a4b52c04cea57491d61624fd2213ea7e4"></a>
  116. void&#160;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="classexperimental_1_1_a_database.html">ADatabase</a> &amp;)=delete</td></tr>
  117. <tr class="separator:a4b52c04cea57491d61624fd2213ea7e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
  118. <tr class="memitem:aa45ad744482ae94d8f639e5837c9c221"><td class="memItemLeft" align="right" valign="top"><a id="aa45ad744482ae94d8f639e5837c9c221"></a>
  119. bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classexperimental_1_1_a_database.html#aa45ad744482ae94d8f639e5837c9c221">connect</a> ()</td></tr>
  120. <tr class="memdesc:aa45ad744482ae94d8f639e5837c9c221"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connect to the database and populate database information. <br /></td></tr>
  121. <tr class="separator:aa45ad744482ae94d8f639e5837c9c221"><td class="memSeparator" colspan="2">&#160;</td></tr>
  122. <tr class="memitem:a5e331e329bc21980d3e2f63c7ca01559"><td class="memItemLeft" align="right" valign="top"><a id="a5e331e329bc21980d3e2f63c7ca01559"></a>
  123. void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classexperimental_1_1_a_database.html#a5e331e329bc21980d3e2f63c7ca01559">disconnect</a> ()</td></tr>
  124. <tr class="memdesc:a5e331e329bc21980d3e2f63c7ca01559"><td class="mdescLeft">&#160;</td><td class="mdescRight">closes the database connection. <br /></td></tr>
  125. <tr class="separator:a5e331e329bc21980d3e2f63c7ca01559"><td class="memSeparator" colspan="2">&#160;</td></tr>
  126. <tr class="memitem:ae536aeb620c52f873f1f0943cfeb9db0"><td class="memItemLeft" align="right" valign="top">QVector&lt; QString &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classexperimental_1_1_a_database.html#ae536aeb620c52f873f1f0943cfeb9db0">customQuery</a> (QString statement, int return_values)</td></tr>
  127. <tr class="memdesc:ae536aeb620c52f873f1f0943cfeb9db0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Can be used to send a complex query to the database. <a href="classexperimental_1_1_a_database.html#ae536aeb620c52f873f1f0943cfeb9db0">More...</a><br /></td></tr>
  128. <tr class="separator:ae536aeb620c52f873f1f0943cfeb9db0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  129. <tr class="memitem:ad3fc7756ef3f032d252b02ed6867e0a5"><td class="memItemLeft" align="right" valign="top"><a id="ad3fc7756ef3f032d252b02ed6867e0a5"></a>
  130. bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classexperimental_1_1_a_database.html#ad3fc7756ef3f032d252b02ed6867e0a5">exists</a> (<a class="el" href="classexperimental_1_1_a_entry.html">AEntry</a> entry)</td></tr>
  131. <tr class="memdesc:ad3fc7756ef3f032d252b02ed6867e0a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if an entry exists in the database, based on position data. <br /></td></tr>
  132. <tr class="separator:ad3fc7756ef3f032d252b02ed6867e0a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
  133. <tr class="memitem:a12a0b931a72e078af0b7ddb0fde7bc0c"><td class="memItemLeft" align="right" valign="top"><a id="a12a0b931a72e078af0b7ddb0fde7bc0c"></a>
  134. bool&#160;</td><td class="memItemRight" valign="bottom"><b>exists</b> (<a class="el" href="structexperimental_1_1_data_position.html">DataPosition</a> data_position)</td></tr>
  135. <tr class="separator:a12a0b931a72e078af0b7ddb0fde7bc0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  136. <tr class="memitem:a041619c4931943406dff1be52eb77434"><td class="memItemLeft" align="right" valign="top"><a id="a041619c4931943406dff1be52eb77434"></a>
  137. bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classexperimental_1_1_a_database.html#a041619c4931943406dff1be52eb77434">commit</a> (<a class="el" href="classexperimental_1_1_a_entry.html">AEntry</a> entry)</td></tr>
  138. <tr class="memdesc:a041619c4931943406dff1be52eb77434"><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>
  139. <tr class="separator:a041619c4931943406dff1be52eb77434"><td class="memSeparator" colspan="2">&#160;</td></tr>
  140. <tr class="memitem:a328fb63a110c9ada4af7ff2e4b240dfe"><td class="memItemLeft" align="right" valign="top"><a id="a328fb63a110c9ada4af7ff2e4b240dfe"></a>
  141. bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classexperimental_1_1_a_database.html#a328fb63a110c9ada4af7ff2e4b240dfe">insert</a> (<a class="el" href="classexperimental_1_1_a_entry.html">AEntry</a> new_entry)</td></tr>
  142. <tr class="memdesc:a328fb63a110c9ada4af7ff2e4b240dfe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create new entry in the databse based on <a class="el" href="classexperimental_1_1_user_input.html" title="The EntryData struct. Contains ALL possible data. However depending on who is constructing it,...">UserInput</a>. <br /></td></tr>
  143. <tr class="separator:a328fb63a110c9ada4af7ff2e4b240dfe"><td class="memSeparator" colspan="2">&#160;</td></tr>
  144. <tr class="memitem:ada25b4b94ab41b5ec78925a0a52b14ca"><td class="memItemLeft" align="right" valign="top"><a id="ada25b4b94ab41b5ec78925a0a52b14ca"></a>
  145. bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classexperimental_1_1_a_database.html#ada25b4b94ab41b5ec78925a0a52b14ca">update</a> (<a class="el" href="classexperimental_1_1_a_entry.html">AEntry</a> updated_entry)</td></tr>
  146. <tr class="memdesc:ada25b4b94ab41b5ec78925a0a52b14ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates entry in database from existing entry tweaked by the user. <br /></td></tr>
  147. <tr class="separator:ada25b4b94ab41b5ec78925a0a52b14ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
  148. <tr class="memitem:aeeb82d8057f36436fd793a242627668e"><td class="memItemLeft" align="right" valign="top"><a id="aeeb82d8057f36436fd793a242627668e"></a>
  149. bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classexperimental_1_1_a_database.html#aeeb82d8057f36436fd793a242627668e">remove</a> (<a class="el" href="classexperimental_1_1_a_entry.html">AEntry</a> entry)</td></tr>
  150. <tr class="memdesc:aeeb82d8057f36436fd793a242627668e"><td class="mdescLeft">&#160;</td><td class="mdescRight">deletes an entry from the database. <br /></td></tr>
  151. <tr class="separator:aeeb82d8057f36436fd793a242627668e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  152. <tr class="memitem:ab4fe26545b5fd05fa6b63486f2d234e3"><td class="memItemLeft" align="right" valign="top"><a id="ab4fe26545b5fd05fa6b63486f2d234e3"></a>
  153. bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classexperimental_1_1_a_database.html#ab4fe26545b5fd05fa6b63486f2d234e3">removeMany</a> (QList&lt; <a class="el" href="structexperimental_1_1_data_position.html">DataPosition</a> &gt;)</td></tr>
  154. <tr class="memdesc:ab4fe26545b5fd05fa6b63486f2d234e3"><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>
  155. <tr class="separator:ab4fe26545b5fd05fa6b63486f2d234e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
  156. <tr class="memitem:ae71340a7dc2668e9ae6e65117b16d1bd"><td class="memItemLeft" align="right" valign="top"><a id="ae71340a7dc2668e9ae6e65117b16d1bd"></a>
  157. TableData&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classexperimental_1_1_a_database.html#ae71340a7dc2668e9ae6e65117b16d1bd">getEntryData</a> (<a class="el" href="structexperimental_1_1_data_position.html">DataPosition</a> data_position)</td></tr>
  158. <tr class="memdesc:ae71340a7dc2668e9ae6e65117b16d1bd"><td class="mdescLeft">&#160;</td><td class="mdescRight">retreive entry data from the database to create an entry object <br /></td></tr>
  159. <tr class="separator:ae71340a7dc2668e9ae6e65117b16d1bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
  160. <tr class="memitem:ad273efb62d7829e5cef4440d78b53161"><td class="memItemLeft" align="right" valign="top"><a id="ad273efb62d7829e5cef4440d78b53161"></a>
  161. <a class="el" href="classexperimental_1_1_a_entry.html">AEntry</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classexperimental_1_1_a_database.html#ad273efb62d7829e5cef4440d78b53161">getEntry</a> (<a class="el" href="structexperimental_1_1_data_position.html">DataPosition</a> data_position)</td></tr>
  162. <tr class="memdesc:ad273efb62d7829e5cef4440d78b53161"><td class="mdescLeft">&#160;</td><td class="mdescRight">retreive an Entry from the database. <br /></td></tr>
  163. <tr class="separator:ad273efb62d7829e5cef4440d78b53161"><td class="memSeparator" colspan="2">&#160;</td></tr>
  164. <tr class="memitem:ae8fac5f877e2ab11eab07781ebcab4b1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structexperimental_1_1_a_pilot_entry.html">APilotEntry</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classexperimental_1_1_a_database.html#ae8fac5f877e2ab11eab07781ebcab4b1">getPilotEntry</a> (RowId row_id)</td></tr>
  165. <tr class="memdesc:ae8fac5f877e2ab11eab07781ebcab4b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">retreives a PilotEntry from the database. <a href="classexperimental_1_1_a_database.html#ae8fac5f877e2ab11eab07781ebcab4b1">More...</a><br /></td></tr>
  166. <tr class="separator:ae8fac5f877e2ab11eab07781ebcab4b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  167. <tr class="memitem:ad05071058f2706dddd9c681d6946ef6d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structexperimental_1_1_a_tail_entry.html">ATailEntry</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classexperimental_1_1_a_database.html#ad05071058f2706dddd9c681d6946ef6d">getTailEntry</a> (RowId row_id)</td></tr>
  168. <tr class="memdesc:ad05071058f2706dddd9c681d6946ef6d"><td class="mdescLeft">&#160;</td><td class="mdescRight">retreives a TailEntry from the database. <a href="classexperimental_1_1_a_database.html#ad05071058f2706dddd9c681d6946ef6d">More...</a><br /></td></tr>
  169. <tr class="separator:ad05071058f2706dddd9c681d6946ef6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  170. <tr class="memitem:aee75f906918935027d95b3e5d8e1ff75"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structexperimental_1_1_a_aircraft_entry.html">AAircraftEntry</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classexperimental_1_1_a_database.html#aee75f906918935027d95b3e5d8e1ff75">getAircraftEntry</a> (RowId row_id)</td></tr>
  171. <tr class="memdesc:aee75f906918935027d95b3e5d8e1ff75"><td class="mdescLeft">&#160;</td><td class="mdescRight">retreives a TailEntry from the database. <a href="classexperimental_1_1_a_database.html#aee75f906918935027d95b3e5d8e1ff75">More...</a><br /></td></tr>
  172. <tr class="separator:aee75f906918935027d95b3e5d8e1ff75"><td class="memSeparator" colspan="2">&#160;</td></tr>
  173. <tr class="memitem:ac613f3dd83524ef30dd6351e3b8a50f3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classexperimental_1_1_a_flight_entry.html">AFlightEntry</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classexperimental_1_1_a_database.html#ac613f3dd83524ef30dd6351e3b8a50f3">getFlightEntry</a> (RowId row_id)</td></tr>
  174. <tr class="memdesc:ac613f3dd83524ef30dd6351e3b8a50f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">retreives a flight entry from the database. <a href="classexperimental_1_1_a_database.html#ac613f3dd83524ef30dd6351e3b8a50f3">More...</a><br /></td></tr>
  175. <tr class="separator:ac613f3dd83524ef30dd6351e3b8a50f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
  176. <tr class="memitem:a1e3fa80e9472325fa41f227319592b26"><td class="memItemLeft" align="right" valign="top"><a id="a1e3fa80e9472325fa41f227319592b26"></a>
  177. const QStringList&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classexperimental_1_1_a_database.html#a1e3fa80e9472325fa41f227319592b26">getCompletionList</a> (<a class="el" href="namespaceexperimental.html#a4ae0b93d398c270c979a8eec17545b8a">ADatabaseTarget</a>)</td></tr>
  178. <tr class="memdesc:a1e3fa80e9472325fa41f227319592b26"><td class="mdescLeft">&#160;</td><td class="mdescRight">getCompletionList returns a QStringList of values for a QCompleter based on database values <br /></td></tr>
  179. <tr class="separator:a1e3fa80e9472325fa41f227319592b26"><td class="memSeparator" colspan="2">&#160;</td></tr>
  180. <tr class="memitem:a74280b96dbf58580ed9b1485b5cdc200"><td class="memItemLeft" align="right" valign="top"><a id="a74280b96dbf58580ed9b1485b5cdc200"></a>
  181. const QMap&lt; QString, int &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classexperimental_1_1_a_database.html#a74280b96dbf58580ed9b1485b5cdc200">getIdMap</a> (<a class="el" href="namespaceexperimental.html#a4ae0b93d398c270c979a8eec17545b8a">ADatabaseTarget</a>)</td></tr>
  182. <tr class="memdesc:a74280b96dbf58580ed9b1485b5cdc200"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns a QMap&lt;QString, int&gt; of a human-readable database value and its row id. Used in the Dialogs to map user input to unique database entries. <br /></td></tr>
  183. <tr class="separator:a74280b96dbf58580ed9b1485b5cdc200"><td class="memSeparator" colspan="2">&#160;</td></tr>
  184. <tr class="memitem:a391a945bf0bf3160045690319833edce"><td class="memItemLeft" align="right" valign="top"><a id="a391a945bf0bf3160045690319833edce"></a>
  185. int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classexperimental_1_1_a_database.html#a391a945bf0bf3160045690319833edce">getLastEntry</a> (<a class="el" href="namespaceexperimental.html#a4ae0b93d398c270c979a8eec17545b8a">ADatabaseTarget</a>)</td></tr>
  186. <tr class="memdesc:a391a945bf0bf3160045690319833edce"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns the ROWID for the newest entry in the respective database. <br /></td></tr>
  187. <tr class="separator:a391a945bf0bf3160045690319833edce"><td class="memSeparator" colspan="2">&#160;</td></tr>
  188. <tr class="memitem:aaa6d9017e72693dd26a0ebd311dcef91"><td class="memItemLeft" align="right" valign="top"><a id="aaa6d9017e72693dd26a0ebd311dcef91"></a>
  189. QList&lt; int &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classexperimental_1_1_a_database.html#aaa6d9017e72693dd26a0ebd311dcef91">getForeignKeyConstraints</a> (int foreign_row_id, <a class="el" href="namespaceexperimental.html#a4ae0b93d398c270c979a8eec17545b8a">ADatabaseTarget</a> target)</td></tr>
  190. <tr class="memdesc:aaa6d9017e72693dd26a0ebd311dcef91"><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>
  191. <tr class="separator:aaa6d9017e72693dd26a0ebd311dcef91"><td class="memSeparator" colspan="2">&#160;</td></tr>
  192. </table><table class="memberdecls">
  193. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
  194. Static Public Member Functions</h2></td></tr>
  195. <tr class="memitem:a98b08ace02b71a593a66bb296169d9e1"><td class="memItemLeft" align="right" valign="top"><a id="a98b08ace02b71a593a66bb296169d9e1"></a>
  196. static <a class="el" href="classexperimental_1_1_a_database.html">ADatabase</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>getInstance</b> ()</td></tr>
  197. <tr class="separator:a98b08ace02b71a593a66bb296169d9e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  198. <tr class="memitem:a5a1d594fadb083e97aa8d50f736ab0ea"><td class="memItemLeft" align="right" valign="top">static QSqlDatabase&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classexperimental_1_1_a_database.html#a5a1d594fadb083e97aa8d50f736ab0ea">database</a> ()</td></tr>
  199. <tr class="memdesc:a5a1d594fadb083e97aa8d50f736ab0ea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Can be used to access the database connection. <a href="classexperimental_1_1_a_database.html#a5a1d594fadb083e97aa8d50f736ab0ea">More...</a><br /></td></tr>
  200. <tr class="separator:a5a1d594fadb083e97aa8d50f736ab0ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
  201. </table><table class="memberdecls">
  202. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
  203. Public Attributes</h2></td></tr>
  204. <tr class="memitem:a2027b0025f37125d03b0058acbe89485"><td class="memItemLeft" align="right" valign="top"><a id="a2027b0025f37125d03b0058acbe89485"></a>
  205. <a class="el" href="classexperimental_1_1_a_database_error.html">ADatabaseError</a>&#160;</td><td class="memItemRight" valign="bottom"><b>lastError</b></td></tr>
  206. <tr class="separator:a2027b0025f37125d03b0058acbe89485"><td class="memSeparator" colspan="2">&#160;</td></tr>
  207. </table>
  208. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  209. <div class="textblock"><p>The DB class encapsulates the SQL database by providing fast access to hot database data. </p>
  210. </div><h2 class="groupheader">Member Function Documentation</h2>
  211. <a id="ae536aeb620c52f873f1f0943cfeb9db0"></a>
  212. <h2 class="memtitle"><span class="permalink"><a href="#ae536aeb620c52f873f1f0943cfeb9db0">&#9670;&nbsp;</a></span>customQuery()</h2>
  213. <div class="memitem">
  214. <div class="memproto">
  215. <table class="memname">
  216. <tr>
  217. <td class="memname">QVector&lt; QString &gt; experimental::ADatabase::customQuery </td>
  218. <td>(</td>
  219. <td class="paramtype">QString&#160;</td>
  220. <td class="paramname"><em>statement</em>, </td>
  221. </tr>
  222. <tr>
  223. <td class="paramkey"></td>
  224. <td></td>
  225. <td class="paramtype">int&#160;</td>
  226. <td class="paramname"><em>return_values</em>&#160;</td>
  227. </tr>
  228. <tr>
  229. <td></td>
  230. <td>)</td>
  231. <td></td><td></td>
  232. </tr>
  233. </table>
  234. </div><div class="memdoc">
  235. <p>Can be used to send a complex query to the database. </p>
  236. <dl class="params"><dt>Parameters</dt><dd>
  237. <table class="params">
  238. <tr><td class="paramname">query</td><td>- the full sql query statement </td></tr>
  239. <tr><td class="paramname">returnValues</td><td>- the number of return values </td></tr>
  240. </table>
  241. </dd>
  242. </dl>
  243. </div>
  244. </div>
  245. <a id="a5a1d594fadb083e97aa8d50f736ab0ea"></a>
  246. <h2 class="memtitle"><span class="permalink"><a href="#a5a1d594fadb083e97aa8d50f736ab0ea">&#9670;&nbsp;</a></span>database()</h2>
  247. <div class="memitem">
  248. <div class="memproto">
  249. <table class="mlabels">
  250. <tr>
  251. <td class="mlabels-left">
  252. <table class="memname">
  253. <tr>
  254. <td class="memname">QSqlDatabase experimental::ADatabase::database </td>
  255. <td>(</td>
  256. <td class="paramname"></td><td>)</td>
  257. <td></td>
  258. </tr>
  259. </table>
  260. </td>
  261. <td class="mlabels-right">
  262. <span class="mlabels"><span class="mlabel">static</span></span> </td>
  263. </tr>
  264. </table>
  265. </div><div class="memdoc">
  266. <p>Can be used to access the database connection. </p>
  267. <dl class="section return"><dt>Returns</dt><dd>The QSqlDatabase object pertaining to the connection. </dd></dl>
  268. </div>
  269. </div>
  270. <a id="aee75f906918935027d95b3e5d8e1ff75"></a>
  271. <h2 class="memtitle"><span class="permalink"><a href="#aee75f906918935027d95b3e5d8e1ff75">&#9670;&nbsp;</a></span>getAircraftEntry()</h2>
  272. <div class="memitem">
  273. <div class="memproto">
  274. <table class="memname">
  275. <tr>
  276. <td class="memname"><a class="el" href="structexperimental_1_1_a_aircraft_entry.html">AAircraftEntry</a> experimental::ADatabase::getAircraftEntry </td>
  277. <td>(</td>
  278. <td class="paramtype">RowId&#160;</td>
  279. <td class="paramname"><em>row_id</em></td><td>)</td>
  280. <td></td>
  281. </tr>
  282. </table>
  283. </div><div class="memdoc">
  284. <p>retreives a TailEntry from the database. </p>
  285. <p>This function is a wrapper for DataBase::getEntry(DataPosition), where the table is already set and which returns an <a class="el" href="structexperimental_1_1_a_aircraft_entry.html">AAircraftEntry</a> instead of an <a class="el" href="classexperimental_1_1_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>
  286. </div>
  287. </div>
  288. <a id="ac613f3dd83524ef30dd6351e3b8a50f3"></a>
  289. <h2 class="memtitle"><span class="permalink"><a href="#ac613f3dd83524ef30dd6351e3b8a50f3">&#9670;&nbsp;</a></span>getFlightEntry()</h2>
  290. <div class="memitem">
  291. <div class="memproto">
  292. <table class="memname">
  293. <tr>
  294. <td class="memname"><a class="el" href="classexperimental_1_1_a_flight_entry.html">AFlightEntry</a> experimental::ADatabase::getFlightEntry </td>
  295. <td>(</td>
  296. <td class="paramtype">RowId&#160;</td>
  297. <td class="paramname"><em>row_id</em></td><td>)</td>
  298. <td></td>
  299. </tr>
  300. </table>
  301. </div><div class="memdoc">
  302. <p>retreives a flight entry from the database. </p>
  303. <p>This function is a wrapper for DataBase::getEntry(DataPosition), where the table is already set and which returns an <a class="el" href="classexperimental_1_1_a_flight_entry.html">AFlightEntry</a> instead of an <a class="el" href="classexperimental_1_1_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>
  304. </div>
  305. </div>
  306. <a id="ae8fac5f877e2ab11eab07781ebcab4b1"></a>
  307. <h2 class="memtitle"><span class="permalink"><a href="#ae8fac5f877e2ab11eab07781ebcab4b1">&#9670;&nbsp;</a></span>getPilotEntry()</h2>
  308. <div class="memitem">
  309. <div class="memproto">
  310. <table class="memname">
  311. <tr>
  312. <td class="memname"><a class="el" href="structexperimental_1_1_a_pilot_entry.html">APilotEntry</a> experimental::ADatabase::getPilotEntry </td>
  313. <td>(</td>
  314. <td class="paramtype">RowId&#160;</td>
  315. <td class="paramname"><em>row_id</em></td><td>)</td>
  316. <td></td>
  317. </tr>
  318. </table>
  319. </div><div class="memdoc">
  320. <p>retreives a PilotEntry from the database. </p>
  321. <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>
  322. </div>
  323. </div>
  324. <a id="ad05071058f2706dddd9c681d6946ef6d"></a>
  325. <h2 class="memtitle"><span class="permalink"><a href="#ad05071058f2706dddd9c681d6946ef6d">&#9670;&nbsp;</a></span>getTailEntry()</h2>
  326. <div class="memitem">
  327. <div class="memproto">
  328. <table class="memname">
  329. <tr>
  330. <td class="memname"><a class="el" href="structexperimental_1_1_a_tail_entry.html">ATailEntry</a> experimental::ADatabase::getTailEntry </td>
  331. <td>(</td>
  332. <td class="paramtype">RowId&#160;</td>
  333. <td class="paramname"><em>row_id</em></td><td>)</td>
  334. <td></td>
  335. </tr>
  336. </table>
  337. </div><div class="memdoc">
  338. <p>retreives a TailEntry from the database. </p>
  339. <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>
  340. </div>
  341. </div>
  342. <hr/>The documentation for this class was generated from the following files:<ul>
  343. <li>src/experimental/<a class="el" href="adatabase_8h_source.html">adatabase.h</a></li>
  344. <li>src/experimental/adatabase.cpp</li>
  345. </ul>
  346. </div><!-- contents -->
  347. </div><!-- doc-content -->
  348. <!-- start footer part -->
  349. <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  350. <ul>
  351. <li class="navelem"><a class="el" href="namespaceexperimental.html">experimental</a></li><li class="navelem"><a class="el" href="classexperimental_1_1_a_database.html">ADatabase</a></li>
  352. <li class="footer">Generated by <a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.8.20 </li>
  353. </ul>
  354. </div>
  355. </body>
  356. </html>