123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
- <meta http-equiv="X-UA-Compatible" content="IE=9"/>
- <meta name="generator" content="Doxygen 1.9.1"/>
- <meta name="viewport" content="width=device-width, initial-scale=1"/>
- <title>openPilotLog: OPL::Database Class Reference</title>
- <link href="tabs.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="jquery.js"></script>
- <script type="text/javascript" src="dynsections.js"></script>
- <link href="navtree.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="resize.js"></script>
- <script type="text/javascript" src="navtreedata.js"></script>
- <script type="text/javascript" src="navtree.js"></script>
- <link href="search/search.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="search/searchdata.js"></script>
- <script type="text/javascript" src="search/search.js"></script>
- <link href="doxygen.css" rel="stylesheet" type="text/css" />
- <link href="custom_dark_theme.css" rel="stylesheet" type="text/css"/>
- </head>
- <body>
- <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
- <div id="titlearea">
- <table cellspacing="0" cellpadding="0">
- <tbody>
- <tr style="height: 56px;">
- <td id="projectlogo"><img alt="Logo" src="icon_main.png"/></td>
- <td id="projectalign" style="padding-left: 0.5em;">
- <div id="projectname">openPilotLog
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!-- end header part -->
- <!-- Generated by Doxygen 1.9.1 -->
- <script type="text/javascript">
- /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
- var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
- /* @license-end */
- </script>
- <script type="text/javascript" src="menudata.js"></script>
- <script type="text/javascript" src="menu.js"></script>
- <script type="text/javascript">
- /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
- $(function() {
- initMenu('',true,false,'search.php','Search');
- $(document).ready(function() { init_search(); });
- });
- /* @license-end */</script>
- <div id="main-nav"></div>
- </div><!-- top -->
- <div id="side-nav" class="ui-resizable side-nav-resizable">
- <div id="nav-tree">
- <div id="nav-tree-contents">
- <div id="nav-sync" class="sync"></div>
- </div>
- </div>
- <div id="splitbar" style="-moz-user-select:none;"
- class="ui-resizable-handle">
- </div>
- </div>
- <script type="text/javascript">
- /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
- $(document).ready(function(){initNavTree('class_o_p_l_1_1_database.html',''); initResizable(); });
- /* @license-end */
- </script>
- <div id="doc-content">
- <!-- window showing the filter options -->
- <div id="MSearchSelectWindow"
- onmouseover="return searchBox.OnSearchSelectShow()"
- onmouseout="return searchBox.OnSearchSelectHide()"
- onkeydown="return searchBox.OnSearchSelectKey(event)">
- </div>
- <!-- iframe showing the search results (closed by default) -->
- <div id="MSearchResultsWindow">
- <iframe src="javascript:void(0)" frameborder="0"
- name="MSearchResults" id="MSearchResults">
- </iframe>
- </div>
- <div class="header">
- <div class="summary">
- <a href="#signals">Signals</a> |
- <a href="#pub-methods">Public Member Functions</a> |
- <a href="#pub-static-methods">Static Public Member Functions</a> |
- <a href="#pub-attribs">Public Attributes</a> |
- <a href="class_o_p_l_1_1_database-members.html">List of all members</a> </div>
- <div class="headertitle">
- <div class="title">OPL::Database Class Reference</div> </div>
- </div><!--header-->
- <div class="contents">
- <p>The DB class encapsulates the SQL database by providing fast access to hot database data.
- <a href="class_o_p_l_1_1_database.html#details">More...</a></p>
- <p><code>#include <<a class="el" href="database_8h_source.html">database.h</a>></code></p>
- <div class="dynheader">
- Inheritance diagram for OPL::Database:</div>
- <div class="dyncontent">
- <div class="center">
- <img src="class_o_p_l_1_1_database.png" alt=""/>
- </div></div>
- <table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="signals"></a>
- Signals</h2></td></tr>
- <tr class="memitem:a8e99ff7cf4173ca1a87ede9acc02be00"><td class="memItemLeft" align="right" valign="top"><a id="a8e99ff7cf4173ca1a87ede9acc02be00"></a>
- void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#a8e99ff7cf4173ca1a87ede9acc02be00">dataBaseUpdated</a> (const <a class="el" href="namespace_o_p_l.html#ada86eb02cea54d91c8c11c9112ec1cf7">DbTable</a> table)</td></tr>
- <tr class="memdesc:a8e99ff7cf4173ca1a87ede9acc02be00"><td class="mdescLeft"> </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>
- <tr class="separator:a8e99ff7cf4173ca1a87ede9acc02be00"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:acc87b25e9ab6a6a6dce1883821292882"><td class="memItemLeft" align="right" valign="top"><a id="acc87b25e9ab6a6a6dce1883821292882"></a>
- void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#acc87b25e9ab6a6a6dce1883821292882">connectionReset</a> ()</td></tr>
- <tr class="memdesc:acc87b25e9ab6a6a6dce1883821292882"><td class="mdescLeft"> </td><td class="mdescRight">connectionReset is emitted whenever the database connection is reset, for example when creating or restoring a backup. <br /></td></tr>
- <tr class="separator:acc87b25e9ab6a6a6dce1883821292882"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
- Public Member Functions</h2></td></tr>
- <tr class="memitem:a040073e7620277891f4ab4de81bca9f4"><td class="memItemLeft" align="right" valign="top"><a id="a040073e7620277891f4ab4de81bca9f4"></a>
-  </td><td class="memItemRight" valign="bottom"><b>Database</b> (const <a class="el" href="class_o_p_l_1_1_database.html">Database</a> &)=delete</td></tr>
- <tr class="separator:a040073e7620277891f4ab4de81bca9f4"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a039830b539f0c81be67ec6796dded105"><td class="memItemLeft" align="right" valign="top"><a id="a039830b539f0c81be67ec6796dded105"></a>
- void </td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="class_o_p_l_1_1_database.html">Database</a> &)=delete</td></tr>
- <tr class="separator:a039830b539f0c81be67ec6796dded105"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a15dbcef162931776a0bdf6610fdd4cde"><td class="memItemLeft" align="right" valign="top"><a id="a15dbcef162931776a0bdf6610fdd4cde"></a>
- bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#a15dbcef162931776a0bdf6610fdd4cde">connect</a> ()</td></tr>
- <tr class="memdesc:a15dbcef162931776a0bdf6610fdd4cde"><td class="mdescLeft"> </td><td class="mdescRight">Connect to the database and populate database information. <br /></td></tr>
- <tr class="separator:a15dbcef162931776a0bdf6610fdd4cde"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aceb1bb497d30d413f87d6541716a873b"><td class="memItemLeft" align="right" valign="top"><a id="aceb1bb497d30d413f87d6541716a873b"></a>
- void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#aceb1bb497d30d413f87d6541716a873b">disconnect</a> ()</td></tr>
- <tr class="memdesc:aceb1bb497d30d413f87d6541716a873b"><td class="mdescLeft"> </td><td class="mdescRight">closes the database connection. <br /></td></tr>
- <tr class="separator:aceb1bb497d30d413f87d6541716a873b"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a55a01dac1e447f7c41474a39d8f621ef"><td class="memItemLeft" align="right" valign="top"><a id="a55a01dac1e447f7c41474a39d8f621ef"></a>
- void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#a55a01dac1e447f7c41474a39d8f621ef">updateLayout</a> ()</td></tr>
- <tr class="memdesc:a55a01dac1e447f7c41474a39d8f621ef"><td class="mdescLeft"> </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>
- <tr class="separator:a55a01dac1e447f7c41474a39d8f621ef"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a6df6e6b98679011f747862ca48a3498c"><td class="memItemLeft" align="right" valign="top"><a id="a6df6e6b98679011f747862ca48a3498c"></a>
- const QString </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#a6df6e6b98679011f747862ca48a3498c">version</a> () const</td></tr>
- <tr class="memdesc:a6df6e6b98679011f747862ca48a3498c"><td class="mdescLeft"> </td><td class="mdescRight">Return the database revision number (not the sqlite version number). <br /></td></tr>
- <tr class="separator:a6df6e6b98679011f747862ca48a3498c"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a0b20bec0f8bef0277325492a1dee33ef"><td class="memItemLeft" align="right" valign="top">const QString </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#a0b20bec0f8bef0277325492a1dee33ef">sqliteVersion</a> () const</td></tr>
- <tr class="memdesc:a0b20bec0f8bef0277325492a1dee33ef"><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="class_o_p_l_1_1_database.html#a0b20bec0f8bef0277325492a1dee33ef" title="Database::sqliteVersion returns the database sqlite version. See also dbRevision()">Database::sqliteVersion</a> returns the database sqlite version. See also dbRevision() <a href="class_o_p_l_1_1_database.html#a0b20bec0f8bef0277325492a1dee33ef">More...</a><br /></td></tr>
- <tr class="separator:a0b20bec0f8bef0277325492a1dee33ef"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a9d09969956b08b86bf83277872354247"><td class="memItemLeft" align="right" valign="top"><a id="a9d09969956b08b86bf83277872354247"></a>
- const QStringList </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#a9d09969956b08b86bf83277872354247">getTableNames</a> () const</td></tr>
- <tr class="memdesc:a9d09969956b08b86bf83277872354247"><td class="mdescLeft"> </td><td class="mdescRight">Return the names of all tables in the database. <br /></td></tr>
- <tr class="separator:a9d09969956b08b86bf83277872354247"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ac5b344097eeb2579da9bcfc7941d074c"><td class="memItemLeft" align="right" valign="top"><a id="ac5b344097eeb2579da9bcfc7941d074c"></a>
- const QStringList </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#ac5b344097eeb2579da9bcfc7941d074c">getTableColumns</a> (<a class="el" href="namespace_o_p_l.html#ada86eb02cea54d91c8c11c9112ec1cf7">OPL::DbTable</a> table_name) const</td></tr>
- <tr class="memdesc:ac5b344097eeb2579da9bcfc7941d074c"><td class="mdescLeft"> </td><td class="mdescRight">Return the names of a given table in the database. <br /></td></tr>
- <tr class="separator:ac5b344097eeb2579da9bcfc7941d074c"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:abf45cf7ba5d25bb5d8f8aac1105bb728"><td class="memItemLeft" align="right" valign="top">QVector< QVariant > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#abf45cf7ba5d25bb5d8f8aac1105bb728">customQuery</a> (QString statement, int return_values)</td></tr>
- <tr class="memdesc:abf45cf7ba5d25bb5d8f8aac1105bb728"><td class="mdescLeft"> </td><td class="mdescRight">Can be used to send a complex query to the database. <a href="class_o_p_l_1_1_database.html#abf45cf7ba5d25bb5d8f8aac1105bb728">More...</a><br /></td></tr>
- <tr class="separator:abf45cf7ba5d25bb5d8f8aac1105bb728"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a69f4a4fa1e496e86224e87612edba548"><td class="memItemLeft" align="right" valign="top"><a id="a69f4a4fa1e496e86224e87612edba548"></a>
- bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#a69f4a4fa1e496e86224e87612edba548">exists</a> (const <a class="el" href="class_o_p_l_1_1_row.html">OPL::Row</a> &row)</td></tr>
- <tr class="memdesc:a69f4a4fa1e496e86224e87612edba548"><td class="mdescLeft"> </td><td class="mdescRight">Checks if an entry exists in the database, based on position data. <br /></td></tr>
- <tr class="separator:a69f4a4fa1e496e86224e87612edba548"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aa342b9d852daecb85fb77ec2f19234a5"><td class="memItemLeft" align="right" valign="top"><a id="aa342b9d852daecb85fb77ec2f19234a5"></a>
- bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#aa342b9d852daecb85fb77ec2f19234a5">clear</a> ()</td></tr>
- <tr class="memdesc:aa342b9d852daecb85fb77ec2f19234a5"><td class="mdescLeft"> </td><td class="mdescRight">clear resets the database, i.e. deletes all content in the tables containing userdata (pilots, flights, tails) <br /></td></tr>
- <tr class="separator:aa342b9d852daecb85fb77ec2f19234a5"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ad9aab9c8bc43009bbc2595409004e20b"><td class="memItemLeft" align="right" valign="top"><a id="ad9aab9c8bc43009bbc2595409004e20b"></a>
- bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#ad9aab9c8bc43009bbc2595409004e20b">commit</a> (const <a class="el" href="class_o_p_l_1_1_row.html">OPL::Row</a> &row)</td></tr>
- <tr class="memdesc:ad9aab9c8bc43009bbc2595409004e20b"><td class="mdescLeft"> </td><td class="mdescRight">commits an entry to the database, calls either insert or update, based on position data <br /></td></tr>
- <tr class="separator:ad9aab9c8bc43009bbc2595409004e20b"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aa83b4d2d9cc2f9e24aaae6a25df829f2"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#aa83b4d2d9cc2f9e24aaae6a25df829f2">commit</a> (const QJsonArray &json_arr, const <a class="el" href="namespace_o_p_l.html#ada86eb02cea54d91c8c11c9112ec1cf7">OPL::DbTable</a> table)</td></tr>
- <tr class="memdesc:aa83b4d2d9cc2f9e24aaae6a25df829f2"><td class="mdescLeft"> </td><td class="mdescRight">commits data imported from JSON <a href="class_o_p_l_1_1_database.html#aa83b4d2d9cc2f9e24aaae6a25df829f2">More...</a><br /></td></tr>
- <tr class="separator:aa83b4d2d9cc2f9e24aaae6a25df829f2"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aa3bbfc0dd7ff7bd34c2c1c847f539168"><td class="memItemLeft" align="right" valign="top"><a id="aa3bbfc0dd7ff7bd34c2c1c847f539168"></a>
- bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#aa3bbfc0dd7ff7bd34c2c1c847f539168">insert</a> (const <a class="el" href="class_o_p_l_1_1_row.html">OPL::Row</a> &new_row)</td></tr>
- <tr class="memdesc:aa3bbfc0dd7ff7bd34c2c1c847f539168"><td class="mdescLeft"> </td><td class="mdescRight">Create new entry in the databse based on UserInput. <br /></td></tr>
- <tr class="separator:aa3bbfc0dd7ff7bd34c2c1c847f539168"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a4938319e593b9e5d5a334f794301d873"><td class="memItemLeft" align="right" valign="top"><a id="a4938319e593b9e5d5a334f794301d873"></a>
- bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#a4938319e593b9e5d5a334f794301d873">update</a> (const <a class="el" href="class_o_p_l_1_1_row.html">OPL::Row</a> &updated_row)</td></tr>
- <tr class="memdesc:a4938319e593b9e5d5a334f794301d873"><td class="mdescLeft"> </td><td class="mdescRight">Updates entry in database from existing entry tweaked by the user. <br /></td></tr>
- <tr class="separator:a4938319e593b9e5d5a334f794301d873"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a29362ea9a2b1805d42e5ef7823c42e50"><td class="memItemLeft" align="right" valign="top"><a id="a29362ea9a2b1805d42e5ef7823c42e50"></a>
- bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#a29362ea9a2b1805d42e5ef7823c42e50">remove</a> (const <a class="el" href="class_o_p_l_1_1_row.html">OPL::Row</a> &row)</td></tr>
- <tr class="memdesc:a29362ea9a2b1805d42e5ef7823c42e50"><td class="mdescLeft"> </td><td class="mdescRight">deletes an entry from the database. <br /></td></tr>
- <tr class="separator:a29362ea9a2b1805d42e5ef7823c42e50"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a6c2ebefc6cf6d948d64dfe71bec08540"><td class="memItemLeft" align="right" valign="top"><a id="a6c2ebefc6cf6d948d64dfe71bec08540"></a>
- bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#a6c2ebefc6cf6d948d64dfe71bec08540">removeMany</a> (<a class="el" href="namespace_o_p_l.html#ada86eb02cea54d91c8c11c9112ec1cf7">OPL::DbTable</a> table, const QList< int > &row_id_list)</td></tr>
- <tr class="memdesc:a6c2ebefc6cf6d948d64dfe71bec08540"><td class="mdescLeft"> </td><td class="mdescRight">deletes a batch of entries from the database. Optimised for speed when deleting many entries. The entries are identified using their row id <br /></td></tr>
- <tr class="separator:a6c2ebefc6cf6d948d64dfe71bec08540"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ae38dc30cb955ffc0e3235e51104dd912"><td class="memItemLeft" align="right" valign="top"><a id="ae38dc30cb955ffc0e3235e51104dd912"></a>
- <a class="el" href="class_o_p_l_1_1_row.html">OPL::Row</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#ae38dc30cb955ffc0e3235e51104dd912">getRow</a> (const <a class="el" href="namespace_o_p_l.html#ada86eb02cea54d91c8c11c9112ec1cf7">OPL::DbTable</a> table, const int row_id)</td></tr>
- <tr class="memdesc:ae38dc30cb955ffc0e3235e51104dd912"><td class="mdescLeft"> </td><td class="mdescRight">retreive a <a class="el" href="class_o_p_l_1_1_row.html" title="The Row class provides an interface for retreiving and submitting entries from the database.">Row</a> from the database <br /></td></tr>
- <tr class="separator:ae38dc30cb955ffc0e3235e51104dd912"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a3657d55721b0d3599ce6df55120017de"><td class="memItemLeft" align="right" valign="top"><a id="a3657d55721b0d3599ce6df55120017de"></a>
- RowData_T </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#a3657d55721b0d3599ce6df55120017de">getRowData</a> (const <a class="el" href="namespace_o_p_l.html#ada86eb02cea54d91c8c11c9112ec1cf7">OPL::DbTable</a> table, const int row_id)</td></tr>
- <tr class="memdesc:a3657d55721b0d3599ce6df55120017de"><td class="mdescLeft"> </td><td class="mdescRight">retreive a Map of <column name, column content> for a specific row in the database. <br /></td></tr>
- <tr class="separator:a3657d55721b0d3599ce6df55120017de"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a2834aeb5c47bde300c898021eb9bbc48"><td class="memItemLeft" align="right" valign="top"><a id="a2834aeb5c47bde300c898021eb9bbc48"></a>
- <a class="el" href="class_o_p_l_1_1_pilot_entry.html">OPL::PilotEntry</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#a2834aeb5c47bde300c898021eb9bbc48">getPilotEntry</a> (int row_id)</td></tr>
- <tr class="memdesc:a2834aeb5c47bde300c898021eb9bbc48"><td class="mdescLeft"> </td><td class="mdescRight">retreives a <a class="el" href="class_o_p_l_1_1_pilot_entry.html" title="A Row representing a Pilot entry. See Row class for details.">PilotEntry</a> from the database. See row class for details. <br /></td></tr>
- <tr class="separator:a2834aeb5c47bde300c898021eb9bbc48"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a95340bb482ca788e748a597d013424ea"><td class="memItemLeft" align="right" valign="top"><a id="a95340bb482ca788e748a597d013424ea"></a>
- <a class="el" href="class_o_p_l_1_1_tail_entry.html">OPL::TailEntry</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#a95340bb482ca788e748a597d013424ea">getTailEntry</a> (int row_id)</td></tr>
- <tr class="memdesc:a95340bb482ca788e748a597d013424ea"><td class="mdescLeft"> </td><td class="mdescRight">retreives a <a class="el" href="class_o_p_l_1_1_tail_entry.html" title="A Row representing a Tail (Registration) entry. See Row class for details.">TailEntry</a> from the database. See row class for details. <br /></td></tr>
- <tr class="separator:a95340bb482ca788e748a597d013424ea"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a84b40aff7668c0782ae25a8d07f60922"><td class="memItemLeft" align="right" valign="top"><a id="a84b40aff7668c0782ae25a8d07f60922"></a>
- <a class="el" href="class_o_p_l_1_1_aircraft_entry.html">OPL::AircraftEntry</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#a84b40aff7668c0782ae25a8d07f60922">getAircraftEntry</a> (int row_id)</td></tr>
- <tr class="memdesc:a84b40aff7668c0782ae25a8d07f60922"><td class="mdescLeft"> </td><td class="mdescRight">retreives a <a class="el" href="class_o_p_l_1_1_tail_entry.html" title="A Row representing a Tail (Registration) entry. See Row class for details.">TailEntry</a> from the database. See row class for details. <br /></td></tr>
- <tr class="separator:a84b40aff7668c0782ae25a8d07f60922"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a568d32e69f438bc165a2a9c1477eaaed"><td class="memItemLeft" align="right" valign="top"><a id="a568d32e69f438bc165a2a9c1477eaaed"></a>
- <a class="el" href="class_o_p_l_1_1_flight_entry.html">OPL::FlightEntry</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#a568d32e69f438bc165a2a9c1477eaaed">getFlightEntry</a> (int row_id)</td></tr>
- <tr class="memdesc:a568d32e69f438bc165a2a9c1477eaaed"><td class="mdescLeft"> </td><td class="mdescRight">retreives a flight entry from the database. See row class for details. <br /></td></tr>
- <tr class="separator:a568d32e69f438bc165a2a9c1477eaaed"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a9e7e61e354d4438dab48a39fb6de1777"><td class="memItemLeft" align="right" valign="top"><a id="a9e7e61e354d4438dab48a39fb6de1777"></a>
- <a class="el" href="class_o_p_l_1_1_simulator_entry.html">OPL::SimulatorEntry</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#a9e7e61e354d4438dab48a39fb6de1777">getSimEntry</a> (int row_id)</td></tr>
- <tr class="memdesc:a9e7e61e354d4438dab48a39fb6de1777"><td class="mdescLeft"> </td><td class="mdescRight">retreives a Simulator entry from the database. See row class for details. <br /></td></tr>
- <tr class="separator:a9e7e61e354d4438dab48a39fb6de1777"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:affb40bf4566d45bdf2a68203b53be4db"><td class="memItemLeft" align="right" valign="top"><a id="affb40bf4566d45bdf2a68203b53be4db"></a>
- <a class="el" href="class_o_p_l_1_1_currency_entry.html">OPL::CurrencyEntry</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#affb40bf4566d45bdf2a68203b53be4db">getCurrencyEntry</a> (int row_id)</td></tr>
- <tr class="memdesc:affb40bf4566d45bdf2a68203b53be4db"><td class="mdescLeft"> </td><td class="mdescRight">Retreives a currency entry from the database. See row class for details. <br /></td></tr>
- <tr class="separator:affb40bf4566d45bdf2a68203b53be4db"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a56ae415d548dca9c6ab3cc0fe0bc818d"><td class="memItemLeft" align="right" valign="top"><a id="a56ae415d548dca9c6ab3cc0fe0bc818d"></a>
- <a class="el" href="class_o_p_l_1_1_airport_entry.html">OPL::AirportEntry</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#a56ae415d548dca9c6ab3cc0fe0bc818d">getAirportEntry</a> (int row_id)</td></tr>
- <tr class="memdesc:a56ae415d548dca9c6ab3cc0fe0bc818d"><td class="mdescLeft"> </td><td class="mdescRight">Retreives an airport entry from the database. See row class for details. <br /></td></tr>
- <tr class="separator:a56ae415d548dca9c6ab3cc0fe0bc818d"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aebf3371c149463c49e818999c427ce6a"><td class="memItemLeft" align="right" valign="top"><a id="aebf3371c149463c49e818999c427ce6a"></a>
- int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#aebf3371c149463c49e818999c427ce6a">getLastEntry</a> (<a class="el" href="namespace_o_p_l.html#ada86eb02cea54d91c8c11c9112ec1cf7">OPL::DbTable</a> table)</td></tr>
- <tr class="memdesc:aebf3371c149463c49e818999c427ce6a"><td class="mdescLeft"> </td><td class="mdescRight">returns the ROWID for the newest entry in the respective table. <br /></td></tr>
- <tr class="separator:aebf3371c149463c49e818999c427ce6a"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a4eb45d764952d44a3c45f16aea2e26d7"><td class="memItemLeft" align="right" valign="top"><a id="a4eb45d764952d44a3c45f16aea2e26d7"></a>
- QList< int > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#a4eb45d764952d44a3c45f16aea2e26d7">getForeignKeyConstraints</a> (int foreign_row_id, <a class="el" href="namespace_o_p_l.html#ada86eb02cea54d91c8c11c9112ec1cf7">OPL::DbTable</a> table)</td></tr>
- <tr class="memdesc:a4eb45d764952d44a3c45f16aea2e26d7"><td class="mdescLeft"> </td><td class="mdescRight">returns a list of ROWID's in the flights table for which foreign key constraints exist. <br /></td></tr>
- <tr class="separator:a4eb45d764952d44a3c45f16aea2e26d7"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a8145a21f5980cb3c55778fbe94ef52a0"><td class="memItemLeft" align="right" valign="top">QVector< RowData_T > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#a8145a21f5980cb3c55778fbe94ef52a0">getTable</a> (<a class="el" href="namespace_o_p_l.html#ada86eb02cea54d91c8c11c9112ec1cf7">OPL::DbTable</a> table)</td></tr>
- <tr class="memdesc:a8145a21f5980cb3c55778fbe94ef52a0"><td class="mdescLeft"> </td><td class="mdescRight">getTable returns all contents of a given table from the database <a href="class_o_p_l_1_1_database.html#a8145a21f5980cb3c55778fbe94ef52a0">More...</a><br /></td></tr>
- <tr class="separator:a8145a21f5980cb3c55778fbe94ef52a0"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ac0db9f1a1817bb62302b17a22327bfeb"><td class="memItemLeft" align="right" valign="top"><a id="ac0db9f1a1817bb62302b17a22327bfeb"></a>
- const QList< <a class="el" href="namespace_o_p_l.html#ada86eb02cea54d91c8c11c9112ec1cf7">OPL::DbTable</a> > & </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#ac0db9f1a1817bb62302b17a22327bfeb">getUserTables</a> () const</td></tr>
- <tr class="memdesc:ac0db9f1a1817bb62302b17a22327bfeb"><td class="mdescLeft"> </td><td class="mdescRight">getUserTables returns a list of the of the tables that contain user-created data (flights, pilots,..) <br /></td></tr>
- <tr class="separator:ac0db9f1a1817bb62302b17a22327bfeb"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ad7cd939e58af8f1fd46f835ee34567e3"><td class="memItemLeft" align="right" valign="top"><a id="ad7cd939e58af8f1fd46f835ee34567e3"></a>
- const QList< <a class="el" href="namespace_o_p_l.html#ada86eb02cea54d91c8c11c9112ec1cf7">OPL::DbTable</a> > & </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#ad7cd939e58af8f1fd46f835ee34567e3">getTemplateTables</a> () const</td></tr>
- <tr class="memdesc:ad7cd939e58af8f1fd46f835ee34567e3"><td class="mdescLeft"> </td><td class="mdescRight">getTemplateTables returns a list of the tables that contain template data (aiports, aircraft,..) <br /></td></tr>
- <tr class="separator:ad7cd939e58af8f1fd46f835ee34567e3"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a92c22cb18c5a23858edd38e0ed9d7117"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#a92c22cb18c5a23858edd38e0ed9d7117">createSchema</a> ()</td></tr>
- <tr class="memdesc:a92c22cb18c5a23858edd38e0ed9d7117"><td class="mdescLeft"> </td><td class="mdescRight">Create or restore the database to its ready-to-use but empty state. <a href="class_o_p_l_1_1_database.html#a92c22cb18c5a23858edd38e0ed9d7117">More...</a><br /></td></tr>
- <tr class="separator:a92c22cb18c5a23858edd38e0ed9d7117"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a4be4811cb27c836070a6b8c09dee6a3b"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#a4be4811cb27c836070a6b8c09dee6a3b">importTemplateData</a> (bool use_local_ressources)</td></tr>
- <tr class="memdesc:a4be4811cb27c836070a6b8c09dee6a3b"><td class="mdescLeft"> </td><td class="mdescRight">importTemplateData fills an empty database with the template data (Aircraft, Airports, currencies, changelog) as read from the JSON templates. <a href="class_o_p_l_1_1_database.html#a4be4811cb27c836070a6b8c09dee6a3b">More...</a><br /></td></tr>
- <tr class="separator:a4be4811cb27c836070a6b8c09dee6a3b"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a63af56a9fbd8cd0290494cc28d327824"><td class="memItemLeft" align="right" valign="top"><a id="a63af56a9fbd8cd0290494cc28d327824"></a>
- bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#a63af56a9fbd8cd0290494cc28d327824">resetUserData</a> ()</td></tr>
- <tr class="memdesc:a63af56a9fbd8cd0290494cc28d327824"><td class="mdescLeft"> </td><td class="mdescRight">Delete all rows from the user data tables (flights, pliots, tails) <br /></td></tr>
- <tr class="separator:a63af56a9fbd8cd0290494cc28d327824"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a40cdc1cce81919c42f91e2e16a63df4a"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#a40cdc1cce81919c42f91e2e16a63df4a">createBackup</a> (const QString &dest_file)</td></tr>
- <tr class="memdesc:a40cdc1cce81919c42f91e2e16a63df4a"><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="class_o_p_l_1_1_database.html#a40cdc1cce81919c42f91e2e16a63df4a" title="Database::createBackup copies the currently used database to an external backup location provided by ...">Database::createBackup</a> copies the currently used database to an external backup location provided by the user. <a href="class_o_p_l_1_1_database.html#a40cdc1cce81919c42f91e2e16a63df4a">More...</a><br /></td></tr>
- <tr class="separator:a40cdc1cce81919c42f91e2e16a63df4a"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a77003350c44e7c6e1c8c4316cc324496"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#a77003350c44e7c6e1c8c4316cc324496">restoreBackup</a> (const QString &backup_file)</td></tr>
- <tr class="memdesc:a77003350c44e7c6e1c8c4316cc324496"><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="class_o_p_l_1_1_database.html#a77003350c44e7c6e1c8c4316cc324496" title="Database::restoreBackup restores the database from a given backup file and replaces the currently act...">Database::restoreBackup</a> restores the database from a given backup file and replaces the currently active database. <a href="class_o_p_l_1_1_database.html#a77003350c44e7c6e1c8c4316cc324496">More...</a><br /></td></tr>
- <tr class="separator:a77003350c44e7c6e1c8c4316cc324496"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
- Static Public Member Functions</h2></td></tr>
- <tr class="memitem:a285c9a2e2436748e1b110232aba30124"><td class="memItemLeft" align="right" valign="top"><a id="a285c9a2e2436748e1b110232aba30124"></a>
- static <a class="el" href="class_o_p_l_1_1_database.html">Database</a> * </td><td class="memItemRight" valign="bottom"><b>instance</b> ()</td></tr>
- <tr class="separator:a285c9a2e2436748e1b110232aba30124"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a233943791f4bca3aa083f46562eb6d50"><td class="memItemLeft" align="right" valign="top">static QSqlDatabase </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#a233943791f4bca3aa083f46562eb6d50">database</a> ()</td></tr>
- <tr class="memdesc:a233943791f4bca3aa083f46562eb6d50"><td class="mdescLeft"> </td><td class="mdescRight">Can be used to access the database connection. <a href="class_o_p_l_1_1_database.html#a233943791f4bca3aa083f46562eb6d50">More...</a><br /></td></tr>
- <tr class="separator:a233943791f4bca3aa083f46562eb6d50"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
- Public Attributes</h2></td></tr>
- <tr class="memitem:aa5b783822a603bdcfd1d8c93ba0af34b"><td class="memItemLeft" align="right" valign="top">QSqlError </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_database.html#aa5b783822a603bdcfd1d8c93ba0af34b">lastError</a></td></tr>
- <tr class="memdesc:aa5b783822a603bdcfd1d8c93ba0af34b"><td class="mdescLeft"> </td><td class="mdescRight">Holds information about the last error that ocurred during a SQL operation. If the error type is QSqlError::UnknownError, the error is related to data from the database (entry not found,...), otherwise the error is related to SQL execution. In this case error.type() provides further information. <a href="class_o_p_l_1_1_database.html#aa5b783822a603bdcfd1d8c93ba0af34b">More...</a><br /></td></tr>
- <tr class="separator:aa5b783822a603bdcfd1d8c93ba0af34b"><td class="memSeparator" colspan="2"> </td></tr>
- </table>
- <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
- <div class="textblock"><p>The DB class encapsulates the SQL database by providing fast access to hot database data. </p>
- </div><h2 class="groupheader">Member Function Documentation</h2>
- <a id="aa83b4d2d9cc2f9e24aaae6a25df829f2"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#aa83b4d2d9cc2f9e24aaae6a25df829f2">◆ </a></span>commit()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">bool OPL::Database::commit </td>
- <td>(</td>
- <td class="paramtype">const QJsonArray & </td>
- <td class="paramname"><em>json_arr</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">const <a class="el" href="namespace_o_p_l.html#ada86eb02cea54d91c8c11c9112ec1cf7">OPL::DbTable</a> </td>
- <td class="paramname"><em>table</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>commits data imported from JSON </p>
- <p>This function is used to import values to the databases which are held in JSON documents. These entries are pre-filled data used for providing completion data, such as Airport or Aircraft Type Data. </p>
- </div>
- </div>
- <a id="a40cdc1cce81919c42f91e2e16a63df4a"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a40cdc1cce81919c42f91e2e16a63df4a">◆ </a></span>createBackup()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">bool OPL::Database::createBackup </td>
- <td>(</td>
- <td class="paramtype">const QString & </td>
- <td class="paramname"><em>dest_file</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p><a class="el" href="class_o_p_l_1_1_database.html#a40cdc1cce81919c42f91e2e16a63df4a" title="Database::createBackup copies the currently used database to an external backup location provided by ...">Database::createBackup</a> copies the currently used database to an external backup location provided by the user. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <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>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <a id="a92c22cb18c5a23858edd38e0ed9d7117"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a92c22cb18c5a23858edd38e0ed9d7117">◆ </a></span>createSchema()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">bool OPL::Database::createSchema </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Create or restore the database to its ready-to-use but empty state. </p>
- <p>The SQL code for the database creation is stored in a .sql file which is available as a ressource. This file gets read, and the querys executed. If errors occur, returns false. </p>
- </div>
- </div>
- <a id="abf45cf7ba5d25bb5d8f8aac1105bb728"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#abf45cf7ba5d25bb5d8f8aac1105bb728">◆ </a></span>customQuery()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">QVector< QVariant > OPL::Database::customQuery </td>
- <td>(</td>
- <td class="paramtype">QString </td>
- <td class="paramname"><em>statement</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>return_values</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Can be used to send a complex query to the database. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">query</td><td>- the full sql query statement </td></tr>
- <tr><td class="paramname">returnValues</td><td>- the number of return values </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <a id="a233943791f4bca3aa083f46562eb6d50"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a233943791f4bca3aa083f46562eb6d50">◆ </a></span>database()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">QSqlDatabase OPL::Database::database </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Can be used to access the database connection. </p>
- <dl class="section return"><dt>Returns</dt><dd>The QSqlDatabase object pertaining to the connection. </dd></dl>
- </div>
- </div>
- <a id="a8145a21f5980cb3c55778fbe94ef52a0"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a8145a21f5980cb3c55778fbe94ef52a0">◆ </a></span>getTable()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">QVector< RowData_T > OPL::Database::getTable </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="namespace_o_p_l.html#ada86eb02cea54d91c8c11c9112ec1cf7">OPL::DbTable</a> </td>
- <td class="paramname"><em>table</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>getTable returns all contents of a given table from the database </p>
- <dl class="section return"><dt>Returns</dt><dd></dd></dl>
- </div>
- </div>
- <a id="a4be4811cb27c836070a6b8c09dee6a3b"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a4be4811cb27c836070a6b8c09dee6a3b">◆ </a></span>importTemplateData()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">bool OPL::Database::importTemplateData </td>
- <td>(</td>
- <td class="paramtype">bool </td>
- <td class="paramname"><em>use_local_ressources</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>importTemplateData fills an empty database with the template data (Aircraft, Airports, currencies, changelog) as read from the JSON templates. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">use_local_ressources</td><td>determines whether the included ressource files or a previously downloaded file should be used. </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd></dd></dl>
- </div>
- </div>
- <a id="a77003350c44e7c6e1c8c4316cc324496"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a77003350c44e7c6e1c8c4316cc324496">◆ </a></span>restoreBackup()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">bool OPL::Database::restoreBackup </td>
- <td>(</td>
- <td class="paramtype">const QString & </td>
- <td class="paramname"><em>backup_file</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p><a class="el" href="class_o_p_l_1_1_database.html#a77003350c44e7c6e1c8c4316cc324496" title="Database::restoreBackup restores the database from a given backup file and replaces the currently act...">Database::restoreBackup</a> restores the database from a given backup file and replaces the currently active database. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <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>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <a id="a0b20bec0f8bef0277325492a1dee33ef"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a0b20bec0f8bef0277325492a1dee33ef">◆ </a></span>sqliteVersion()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">const QString OPL::Database::sqliteVersion </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td> const</td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p><a class="el" href="class_o_p_l_1_1_database.html#a0b20bec0f8bef0277325492a1dee33ef" title="Database::sqliteVersion returns the database sqlite version. See also dbRevision()">Database::sqliteVersion</a> returns the database sqlite version. See also dbRevision() </p>
- <dl class="section return"><dt>Returns</dt><dd>sqlite version string </dd></dl>
- </div>
- </div>
- <h2 class="groupheader">Member Data Documentation</h2>
- <a id="aa5b783822a603bdcfd1d8c93ba0af34b"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#aa5b783822a603bdcfd1d8c93ba0af34b">◆ </a></span>lastError</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">QSqlError OPL::Database::lastError</td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Holds information about the last error that ocurred during a SQL operation. If the error type is QSqlError::UnknownError, the error is related to data from the database (entry not found,...), otherwise the error is related to SQL execution. In this case error.type() provides further information. </p>
- <p>If the error type is QSqlError::NoError, the last executed database query was successful. </p>
- </div>
- </div>
- <hr/>The documentation for this class was generated from the following files:<ul>
- <li>src/database/<a class="el" href="database_8h_source.html">database.h</a></li>
- <li>src/database/database.cpp</li>
- </ul>
- </div><!-- contents -->
- </div><!-- doc-content -->
- <!-- start footer part -->
- <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
- <ul>
- <li class="navelem"><a class="el" href="namespace_o_p_l.html">OPL</a></li><li class="navelem"><a class="el" href="class_o_p_l_1_1_database.html">Database</a></li>
- <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
- </ul>
- </div>
- </body>
- </html>
|