SQLiteCpp/doc/html/class_s_q_lite_1_1_database.html
2013-03-10 20:57:10 +01:00

530 lines
31 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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.8.3.1"/>
<title>SQLiteC++: SQLite::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="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.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 style="padding-left: 0.5em;">
<div id="projectname">SQLiteC++
&#160;<span id="projectnumber">0.5.0</span>
</div>
<div id="projectbrief">SQLiteC++ is a smart and easy to use C++ SQLite3 wrapper.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</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">
$(document).ready(function(){initNavTree('class_s_q_lite_1_1_database.html','');});
</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)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Macros</a></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="#pub-methods">Public Member Functions</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="class_s_q_lite_1_1_database-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">SQLite::Database Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>RAII management of a <a class="el" href="namespace_s_q_lite.html">SQLite</a> <a class="el" href="class_s_q_lite_1_1_database.html" title="RAII management of a SQLite Database Connection.">Database</a> Connection.
<a href="class_s_q_lite_1_1_database.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="_database_8h_source.html">Database.h</a>&gt;</code></p>
<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:a3f63d182d0c627cec392921f5c0a75a3"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_q_lite_1_1_database.html#a3f63d182d0c627cec392921f5c0a75a3">Database</a> (const char *apFilename, const int aFlags=SQLITE_OPEN_READONLY)</td></tr>
<tr class="memdesc:a3f63d182d0c627cec392921f5c0a75a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Open the provided database UTF-8 filename. <a href="#a3f63d182d0c627cec392921f5c0a75a3">More...</a><br/></td></tr>
<tr class="separator:a3f63d182d0c627cec392921f5c0a75a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f2acfa583fe30e3f068491101e32292"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_q_lite_1_1_database.html#a1f2acfa583fe30e3f068491101e32292">~Database</a> (void) throw ()</td></tr>
<tr class="memdesc:a1f2acfa583fe30e3f068491101e32292"><td class="mdescLeft">&#160;</td><td class="mdescRight">Close the <a class="el" href="namespace_s_q_lite.html">SQLite</a> database connection. <a href="#a1f2acfa583fe30e3f068491101e32292">More...</a><br/></td></tr>
<tr class="separator:a1f2acfa583fe30e3f068491101e32292"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0158bf527b79317679c9cf1e6daf1c43"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_q_lite_1_1_database.html#a0158bf527b79317679c9cf1e6daf1c43">exec</a> (const char *apQueries)</td></tr>
<tr class="memdesc:a0158bf527b79317679c9cf1e6daf1c43"><td class="mdescLeft">&#160;</td><td class="mdescRight">Shortcut to execute one or multiple statements without results. <a href="#a0158bf527b79317679c9cf1e6daf1c43">More...</a><br/></td></tr>
<tr class="separator:a0158bf527b79317679c9cf1e6daf1c43"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac828a49fab425564e65c95ff1fd03c74"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_s_q_lite_1_1_column.html">Column</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_q_lite_1_1_database.html#ac828a49fab425564e65c95ff1fd03c74">execAndGet</a> (const char *apQuery)</td></tr>
<tr class="memdesc:ac828a49fab425564e65c95ff1fd03c74"><td class="mdescLeft">&#160;</td><td class="mdescRight">Shortcut to execute a one step query and fetch the first column of the result. <a href="#ac828a49fab425564e65c95ff1fd03c74">More...</a><br/></td></tr>
<tr class="separator:ac828a49fab425564e65c95ff1fd03c74"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a672bdb55f1fe7be6f9498bbab1a3f740"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_q_lite_1_1_database.html#a672bdb55f1fe7be6f9498bbab1a3f740">tableExists</a> (const char *apTableName)</td></tr>
<tr class="memdesc:a672bdb55f1fe7be6f9498bbab1a3f740"><td class="mdescLeft">&#160;</td><td class="mdescRight">Shortcut to test if a table exists. <a href="#a672bdb55f1fe7be6f9498bbab1a3f740">More...</a><br/></td></tr>
<tr class="separator:a672bdb55f1fe7be6f9498bbab1a3f740"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf15791462a6997f0d7a942465924b52"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_q_lite_1_1_database.html#abf15791462a6997f0d7a942465924b52">setBusyTimeout</a> (int aTimeoutMs)</td></tr>
<tr class="memdesc:abf15791462a6997f0d7a942465924b52"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set a busy handler that sleeps for a specified amount of time when a table is locked. <a href="#abf15791462a6997f0d7a942465924b52">More...</a><br/></td></tr>
<tr class="separator:abf15791462a6997f0d7a942465924b52"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af6833c6cbe9b315d496306c07ad38593"><td class="memItemLeft" align="right" valign="top">sqlite3_int64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_q_lite_1_1_database.html#af6833c6cbe9b315d496306c07ad38593">getLastInsertRowid</a> (void) const </td></tr>
<tr class="memdesc:af6833c6cbe9b315d496306c07ad38593"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the rowid of the most recent successful INSERT into the database from the current connection. <a href="#af6833c6cbe9b315d496306c07ad38593">More...</a><br/></td></tr>
<tr class="separator:af6833c6cbe9b315d496306c07ad38593"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f27c66c43b3518ee4ccc6f5615216d2"><td class="memItemLeft" align="right" valign="top">const std::string &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_q_lite_1_1_database.html#a3f27c66c43b3518ee4ccc6f5615216d2">getFilename</a> (void) const </td></tr>
<tr class="memdesc:a3f27c66c43b3518ee4ccc6f5615216d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the filename used to open the database. <a href="#a3f27c66c43b3518ee4ccc6f5615216d2">More...</a><br/></td></tr>
<tr class="separator:a3f27c66c43b3518ee4ccc6f5615216d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abfc1f4000cecde6f8d05cfe882ebde7c"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_q_lite_1_1_database.html#abfc1f4000cecde6f8d05cfe882ebde7c">errmsg</a> (void) const </td></tr>
<tr class="memdesc:abfc1f4000cecde6f8d05cfe882ebde7c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return UTF-8 encoded English language explanation of the most recent error. <a href="#abfc1f4000cecde6f8d05cfe882ebde7c">More...</a><br/></td></tr>
<tr class="separator:abfc1f4000cecde6f8d05cfe882ebde7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:adab6e13caeb507948d0ee0b059b1a1af"><td class="memItemLeft" align="right" valign="top">class&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_q_lite_1_1_database.html#adab6e13caeb507948d0ee0b059b1a1af">Statement</a></td></tr>
<tr class="separator:adab6e13caeb507948d0ee0b059b1a1af"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>RAII management of a <a class="el" href="namespace_s_q_lite.html">SQLite</a> <a class="el" href="class_s_q_lite_1_1_database.html" title="RAII management of a SQLite Database Connection.">Database</a> Connection. </p>
<p>A <a class="el" href="class_s_q_lite_1_1_database.html" title="RAII management of a SQLite Database Connection.">Database</a> object manage a list of all <a class="el" href="namespace_s_q_lite.html">SQLite</a> Statements associated with the underlying <a class="el" href="namespace_s_q_lite.html">SQLite</a> 3 database connection.</p>
<p>Resource Acquisition Is Initialization (RAII) means that the <a class="el" href="class_s_q_lite_1_1_database.html" title="RAII management of a SQLite Database Connection.">Database</a> Connection is opened in the constructor and closed in the destructor, so that there is no need to worry about memory management or the validity of the underlying <a class="el" href="namespace_s_q_lite.html">SQLite</a> Connection. </p>
<p>Definition at line <a class="el" href="_database_8h_source.html#l00029">29</a> of file <a class="el" href="_database_8h_source.html">Database.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a3f63d182d0c627cec392921f5c0a75a3"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">SQLite::Database::Database </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>apFilename</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const int&#160;</td>
<td class="paramname"><em>aFlags</em> = <code>SQLITE_OPEN_READONLY</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Open the provided database UTF-8 filename. </p>
<p>Uses sqlite3_open_v2() with readonly default flag, which is the opposite behavior of the old sqlite3_open() function (READWRITE+CREATE). This makes sense if you want to use it on a readonly filesystem or to prevent creation of a void file when a required file is missing.</p>
<p><a class="el" href="class_s_q_lite_1_1_exception.html" title="Encapsulation of the error message from SQLite3, based on std::runtime_error.">Exception</a> is thrown in case of error, then the <a class="el" href="class_s_q_lite_1_1_database.html" title="RAII management of a SQLite Database Connection.">Database</a> object is NOT constructed.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">apFilename</td><td>UTF-8 path/uri to the database file ("filename" sqlite3 parameter) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">aFlags</td><td>SQLITE_OPEN_READONLY/SQLITE_OPEN_READWRITE/SQLITE_OPEN_CREATE... </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_database_8cpp_source.html#l00018">18</a> of file <a class="el" href="_database_8cpp_source.html">Database.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a1f2acfa583fe30e3f068491101e32292"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">SQLite::Database::~Database </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td> throw ()</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Close the <a class="el" href="namespace_s_q_lite.html">SQLite</a> database connection. </p>
<p>All <a class="el" href="namespace_s_q_lite.html">SQLite</a> statements must have been finalized before, so all <a class="el" href="class_s_q_lite_1_1_statement.html" title="RAII encapsulation of a prepared SQLite Statement.">Statement</a> objects must have been unregistered. </p>
<p>Definition at line <a class="el" href="_database_8cpp_source.html#l00032">32</a> of file <a class="el" href="_database_8cpp_source.html">Database.cpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="abfc1f4000cecde6f8d05cfe882ebde7c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const char* SQLite::Database::errmsg </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Return UTF-8 encoded English language explanation of the most recent error. </p>
<p>Definition at line <a class="el" href="_database_8h_source.html#l00141">141</a> of file <a class="el" href="_database_8h_source.html">Database.h</a>.</p>
</div>
</div>
<a class="anchor" id="a0158bf527b79317679c9cf1e6daf1c43"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int SQLite::Database::exec </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>apQueries</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Shortcut to execute one or multiple statements without results. </p>
<p>This is useful for any kind of statements other than the Data Query Language (DQL) "SELECT" :</p>
<ul>
<li>Data Definition Language (DDL) statements "CREATE", "ALTER" and "DROP"</li>
<li>Data Manipulation Language (DML) statements "INSERT", "UPDATE" and "DELETE"</li>
<li>Data Control Language (DCL) statements "GRANT", "REVOKE", "COMMIT" and "ROLLBACK"</li>
</ul>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="class_s_q_lite_1_1_statement.html#a6d78e0ae6321bc695d21f1bada8bbadb" title="Execute a one-step query with no expected result.">Statement::exec()</a> to handle precompiled statements (for better performances) without results </dd>
<dd>
<a class="el" href="class_s_q_lite_1_1_statement.html#aa7f29464b5fbe4b8da92d769e52472d8" title="Execute a step of the prepared query to fetch one row of results.">Statement::executeStep()</a> to handle "SELECT" queries with results</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">apQueries</td><td>one or multiple UTF-8 encoded, semicolon-separate SQL statements</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>number of rows modified by those SQL statements (INSERT, UPDATE or DELETE)</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="class_s_q_lite_1_1_exception.html" title="Encapsulation of the error message from SQLite3, based on std::runtime_error.">SQLite::Exception</a></td><td>in case of error </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_database_8cpp_source.html#l00041">41</a> of file <a class="el" href="_database_8cpp_source.html">Database.cpp</a>.</p>
<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_s_q_lite_1_1_database_a0158bf527b79317679c9cf1e6daf1c43_icgraph.png" border="0" usemap="#class_s_q_lite_1_1_database_a0158bf527b79317679c9cf1e6daf1c43_icgraph" alt=""/></div>
<map name="class_s_q_lite_1_1_database_a0158bf527b79317679c9cf1e6daf1c43_icgraph" id="class_s_q_lite_1_1_database_a0158bf527b79317679c9cf1e6daf1c43_icgraph">
<area shape="rect" id="node2" href="class_s_q_lite_1_1_transaction.html#a2c18ffe14d32584c88ea83a72243d412" title="Begins the SQLite transaction." alt="" coords="217,5,354,46"/>
<area shape="rect" id="node3" href="class_s_q_lite_1_1_transaction.html#a87b3d44948f0899c494e62542b3f92c3" title="Safely rollback the transaction if it has not been committed." alt="" coords="217,70,354,111"/>
<area shape="rect" id="node4" href="class_s_q_lite_1_1_transaction.html#a359ed0e2e88fec83c90f513598e1b03f" title="Commit the transaction." alt="" coords="217,135,354,177"/>
</map>
</div>
</p>
</div>
</div>
<a class="anchor" id="ac828a49fab425564e65c95ff1fd03c74"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_s_q_lite_1_1_column.html">Column</a> SQLite::Database::execAndGet </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>apQuery</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Shortcut to execute a one step query and fetch the first column of the result. </p>
<p>This is a shortcut to execute a simple statement with a single result. This should be used only for non reusable queries (else you should use a <a class="el" href="class_s_q_lite_1_1_statement.html" title="RAII encapsulation of a prepared SQLite Statement.">Statement</a> with bind()). This should be used only for queries with expected results (else an exception is fired).</p>
<dl class="section warning"><dt>Warning</dt><dd>WARNING: Be very careful with this dangerous method: you have to make a COPY OF THE result, else it will be destroy before the next line (when the underlying temporary <a class="el" href="class_s_q_lite_1_1_statement.html" title="RAII encapsulation of a prepared SQLite Statement.">Statement</a> and <a class="el" href="class_s_q_lite_1_1_column.html" title="Encapsulation of a Column in a row of the result pointed by the prepared Statement.">Column</a> objects are destroyed)</dd></dl>
<dl class="section see"><dt>See Also</dt><dd>also <a class="el" href="class_s_q_lite_1_1_statement.html" title="RAII encapsulation of a prepared SQLite Statement.">Statement</a> class for handling queries with multiple results</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">apQuery</td><td>an UTF-8 encoded SQL query</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a temporary <a class="el" href="class_s_q_lite_1_1_column.html" title="Encapsulation of a Column in a row of the result pointed by the prepared Statement.">Column</a> object with the first column of result.</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="class_s_q_lite_1_1_exception.html" title="Encapsulation of the error message from SQLite3, based on std::runtime_error.">SQLite::Exception</a></td><td>in case of error </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_database_8cpp_source.html#l00056">56</a> of file <a class="el" href="_database_8cpp_source.html">Database.cpp</a>.</p>
<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_s_q_lite_1_1_database_ac828a49fab425564e65c95ff1fd03c74_cgraph.png" border="0" usemap="#class_s_q_lite_1_1_database_ac828a49fab425564e65c95ff1fd03c74_cgraph" alt=""/></div>
<map name="class_s_q_lite_1_1_database_ac828a49fab425564e65c95ff1fd03c74_cgraph" id="class_s_q_lite_1_1_database_ac828a49fab425564e65c95ff1fd03c74_cgraph">
<area shape="rect" id="node2" href="class_s_q_lite_1_1_statement.html#aa7f29464b5fbe4b8da92d769e52472d8" title="Execute a step of the prepared query to fetch one row of results." alt="" coords="259,5,397,46"/>
<area shape="rect" id="node3" href="class_s_q_lite_1_1_statement.html#a5b7c9372b9023a86e7242d47052f06f7" title="Return a copie of the column data specified by its index." alt="" coords="259,70,397,111"/>
</map>
</div>
</p>
</div>
</div>
<a class="anchor" id="a3f27c66c43b3518ee4ccc6f5615216d2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const std::string&amp; SQLite::Database::getFilename </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Return the filename used to open the database. </p>
<p>Definition at line <a class="el" href="_database_8h_source.html#l00133">133</a> of file <a class="el" href="_database_8h_source.html">Database.h</a>.</p>
</div>
</div>
<a class="anchor" id="af6833c6cbe9b315d496306c07ad38593"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">sqlite3_int64 SQLite::Database::getLastInsertRowid </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the rowid of the most recent successful INSERT into the database from the current connection. </p>
<dl class="section return"><dt>Returns</dt><dd>Rowid of the most recent successful INSERT into the database, or 0 if there was none. </dd></dl>
<p>Definition at line <a class="el" href="_database_8h_source.html#l00125">125</a> of file <a class="el" href="_database_8h_source.html">Database.h</a>.</p>
</div>
</div>
<a class="anchor" id="abf15791462a6997f0d7a942465924b52"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">int SQLite::Database::setBusyTimeout </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>aTimeoutMs</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Set a busy handler that sleeps for a specified amount of time when a table is locked. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">aTimeoutMs</td><td>Amount of milliseconds to wait before returning SQLITE_BUSY </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_database_8h_source.html#l00115">115</a> of file <a class="el" href="_database_8h_source.html">Database.h</a>.</p>
</div>
</div>
<a class="anchor" id="a672bdb55f1fe7be6f9498bbab1a3f740"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool SQLite::Database::tableExists </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>apTableName</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Shortcut to test if a table exists. </p>
<p>Table names are case sensitive.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">apTableName</td><td>an UTF-8 encoded case sensitive Table name</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the table exists.</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="class_s_q_lite_1_1_exception.html" title="Encapsulation of the error message from SQLite3, based on std::runtime_error.">SQLite::Exception</a></td><td>in case of error </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_database_8cpp_source.html#l00064">64</a> of file <a class="el" href="_database_8cpp_source.html">Database.cpp</a>.</p>
<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_s_q_lite_1_1_database_a672bdb55f1fe7be6f9498bbab1a3f740_cgraph.png" border="0" usemap="#class_s_q_lite_1_1_database_a672bdb55f1fe7be6f9498bbab1a3f740_cgraph" alt=""/></div>
<map name="class_s_q_lite_1_1_database_a672bdb55f1fe7be6f9498bbab1a3f740_cgraph" id="class_s_q_lite_1_1_database_a672bdb55f1fe7be6f9498bbab1a3f740_cgraph">
<area shape="rect" id="node2" href="class_s_q_lite_1_1_statement.html#a265f4a381704d7ce94855d49db2c52e9" title="Bind an int value to a parameter &quot;?&quot;, &quot;?NNN&quot;, &quot;:VVV&quot;, &quot;@VVV&quot; or &quot;$VVV&quot; in the SQL prepared statement ..." alt="" coords="253,5,416,32"/>
<area shape="rect" id="node3" href="class_s_q_lite_1_1_statement.html#aa7f29464b5fbe4b8da92d769e52472d8" title="Execute a step of the prepared query to fetch one row of results." alt="" coords="265,57,404,98"/>
<area shape="rect" id="node4" href="class_s_q_lite_1_1_statement.html#a5b7c9372b9023a86e7242d47052f06f7" title="Return a copie of the column data specified by its index." alt="" coords="265,122,404,163"/>
</map>
</div>
</p>
</div>
</div>
<h2 class="groupheader">Friends And Related Function Documentation</h2>
<a class="anchor" id="adab6e13caeb507948d0ee0b059b1a1af"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">friend class <a class="el" href="class_s_q_lite_1_1_statement.html">Statement</a></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="_database_8h_source.html#l00031">31</a> of file <a class="el" href="_database_8h_source.html">Database.h</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/<a class="el" href="_database_8h_source.html">Database.h</a></li>
<li>src/<a class="el" href="_database_8cpp_source.html">Database.cpp</a></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_s_q_lite.html">SQLite</a></li><li class="navelem"><a class="el" href="class_s_q_lite_1_1_database.html">Database</a></li>
<li class="footer">Generated on Sun Mar 10 2013 18:17:22 for SQLiteC++ by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.3.1 </li>
</ul>
</div>
</body>
</html>