This file is indexed.

/usr/share/doc/libtntdb-dev/html/index.html is in libtntdb-dev 1.3-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<!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.4"/>
<title>tntdb: Easy to use database abstraction layer</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="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">tntdb
   &#160;<span id="projectnumber">1.3</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.4 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li class="current"><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</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('index.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">Easy to use database abstraction layer </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h1><a class="anchor" id="intro"></a>
Introduction</h1>
<p>Tntdb is database abstraction layer for C++.</p>
<p>The goals are:</p>
<ul>
<li>easy and safe to use</li>
<li>automatic resource management</li>
<li>database independent</li>
<li>thin layer for best performance</li>
<li>no SQL-abstraction</li>
<li>use modern C++ with exceptions and STL</li>
<li>support for multithreaded applications</li>
</ul>
<p>A example, which lists the the content of a table:</p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &lt;iostream&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;tntdb/connect.h&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;tntdb/statement.h&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;tntdb/row.h&gt;</span></div>
<div class="line"></div>
<div class="line"><span class="keywordtype">int</span> main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span>* argv[])</div>
<div class="line">{</div>
<div class="line">  <span class="keywordflow">try</span></div>
<div class="line">  {</div>
<div class="line">    <a class="code" href="classtntdb_1_1Connection.html" title="This class holds a connection to a database. ">tntdb::Connection</a> conn = <a class="code" href="namespacetntdb.html#aded53fdc127585f36b1858ff6da295d7" title="Establish a connection to a database. ">tntdb::connect</a>(<span class="stringliteral">&quot;sqlite:mydatabase.db&quot;</span>);</div>
<div class="line"></div>
<div class="line">    <a class="code" href="classtntdb_1_1Statement.html" title="This class represents a sql-statement. ">tntdb::Statement</a> stmt = conn.<a class="code" href="classtntdb_1_1Connection.html#afb1b94419af3263fe9f36d002f5b26fd" title="Creates a new Statement-object, with the given query. ">prepare</a>(</div>
<div class="line">        <span class="stringliteral">&quot;select FIRST_NAME, LAST_NAME&quot;</span></div>
<div class="line">        <span class="stringliteral">&quot;  from ADDRESS&quot;</span>);</div>
<div class="line"></div>
<div class="line">    <span class="keywordflow">for</span> (<a class="code" href="classtntdb_1_1Statement_1_1const__iterator.html" title="This class represents a database-cursor. ">tntdb::Statement::const_iterator</a> cur = stmt.<a class="code" href="classtntdb_1_1Statement.html#a86d89ceb894d48b27d0fdb4cb30f65db" title="This methods creates a cursor and fetches the first row. ">begin</a>();</div>
<div class="line">         cur != stmt.<a class="code" href="classtntdb_1_1Statement.html#aa515b1b52f573cfba028574f0ca487cc" title="A empty iterator is returned. ">end</a>(); ++cur)</div>
<div class="line">    {</div>
<div class="line">      <a class="code" href="classtntdb_1_1Row.html" title="Row represents a row, which is fetched from the database. ">tntdb::Row</a> row = *cur;</div>
<div class="line">      std::cout &lt;&lt; row[0].<a class="code" href="classtntdb_1_1Row.html#adaec8c9008d073c0607a9a79235ff0e4" title="The get-methods try to convert the value of the speicfied column to the requested type...">getString</a>() &lt;&lt; <span class="charliteral">&#39;\t&#39;</span> &lt;&lt; row[1].<a class="code" href="classtntdb_1_1Row.html#adaec8c9008d073c0607a9a79235ff0e4" title="The get-methods try to convert the value of the speicfied column to the requested type...">getString</a>() &lt;&lt; std::endl;</div>
<div class="line">    }</div>
<div class="line">  }</div>
<div class="line">  <span class="keywordflow">catch</span> (<span class="keyword">const</span> std::exception&amp; e)</div>
<div class="line">  {</div>
<div class="line">    std::cerr &lt;&lt; e.what() &lt;&lt; std::endl;</div>
<div class="line">  }</div>
<div class="line">}</div>
</div><!-- fragment --><p>Example: modify data:</p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &lt;iostream&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;tntdb/connect.h&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;tntdb/statement.h&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;tntdb/row.h&gt;</span></div>
<div class="line"></div>
<div class="line"><span class="keywordtype">int</span> main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span>* argv[])</div>
<div class="line">{</div>
<div class="line">  <span class="keywordflow">try</span></div>
<div class="line">  {</div>
<div class="line">    <a class="code" href="classtntdb_1_1Connection.html" title="This class holds a connection to a database. ">tntdb::Connection</a> conn = <a class="code" href="namespacetntdb.html#aded53fdc127585f36b1858ff6da295d7" title="Establish a connection to a database. ">tntdb::connect</a>(<span class="stringliteral">&quot;sqlite:mydatabase.db&quot;</span>);</div>
<div class="line"></div>
<div class="line">    <a class="code" href="classtntdb_1_1Transaction.html" title="The class Transaction monitors the state of a transaction on a database-conection. ">tntdb::Transaction</a> trans;  <span class="comment">// start a transaction here</span></div>
<div class="line"></div>
<div class="line">    <a class="code" href="classtntdb_1_1Statement.html" title="This class represents a sql-statement. ">tntdb::Statement</a> stmt = conn.<a class="code" href="classtntdb_1_1Connection.html#afb1b94419af3263fe9f36d002f5b26fd" title="Creates a new Statement-object, with the given query. ">prepare</a>(</div>
<div class="line">        <span class="stringliteral">&quot;insert into ADDRESS (ID, FIRST_NAME, LAST_NAME)&quot;</span></div>
<div class="line">        <span class="stringliteral">&quot;  values (:id, :firstName, :lastName)&quot;</span>);</div>
<div class="line"></div>
<div class="line">    stmt.<a class="code" href="classtntdb_1_1Statement.html#a7383655d68796935e2027ff115be3b14" title="Set the hostvariable with the given name to the passed value. ">set</a>(<span class="stringliteral">&quot;id&quot;</span>, 34)</div>
<div class="line">        .<a class="code" href="classtntdb_1_1Statement.html#a7383655d68796935e2027ff115be3b14" title="Set the hostvariable with the given name to the passed value. ">set</a>(<span class="stringliteral">&quot;firstName&quot;</span>, <span class="stringliteral">&quot;Tommi&quot;</span>)</div>
<div class="line">        .<a class="code" href="classtntdb_1_1Statement.html#a7383655d68796935e2027ff115be3b14" title="Set the hostvariable with the given name to the passed value. ">set</a>(<span class="stringliteral">&quot;lastName&quot;</span>, <span class="stringliteral">&quot;Makitalo&quot;</span>)</div>
<div class="line">        .<a class="code" href="classtntdb_1_1Statement.html#a755e09c9590ae0880054c8491499f4ea" title="statement-execution-methods ">execute</a>();</div>
<div class="line"></div>
<div class="line">    stmt.<a class="code" href="classtntdb_1_1Statement.html#a7383655d68796935e2027ff115be3b14" title="Set the hostvariable with the given name to the passed value. ">set</a>(<span class="stringliteral">&quot;id&quot;</span>, 35)</div>
<div class="line">        .<a class="code" href="classtntdb_1_1Statement.html#a7383655d68796935e2027ff115be3b14" title="Set the hostvariable with the given name to the passed value. ">set</a>(<span class="stringliteral">&quot;firstName&quot;</span>, <span class="stringliteral">&quot;Linus&quot;</span>)</div>
<div class="line">        .<a class="code" href="classtntdb_1_1Statement.html#a7383655d68796935e2027ff115be3b14" title="Set the hostvariable with the given name to the passed value. ">set</a>(<span class="stringliteral">&quot;lastName&quot;</span>, <span class="stringliteral">&quot;Torvalds&quot;</span>)</div>
<div class="line">        .<a class="code" href="classtntdb_1_1Statement.html#a755e09c9590ae0880054c8491499f4ea" title="statement-execution-methods ">execute</a>();</div>
<div class="line"></div>
<div class="line">    <span class="comment">// if no explicit commit is executed, then rollback is done</span></div>
<div class="line">    trans.<a class="code" href="classtntdb_1_1Transaction.html#a2a85b5c454f0c8a7df04f23567ae4d72" title="commits the current transaction. ">commit</a>();</div>
<div class="line">  }</div>
<div class="line">  <span class="keywordflow">catch</span> (<span class="keyword">const</span> std::exception&amp; e)</div>
<div class="line">  {</div>
<div class="line">    std::cerr &lt;&lt; e.what() &lt;&lt; std::endl;</div>
<div class="line">  }</div>
<div class="line">}</div>
</div><!-- fragment --> </div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Mon Jul 15 2013 12:18:51 for tntdb by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.4 </li>
  </ul>
</div>
</body>
</html>