mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-19 10:35:50 +00:00
82 lines
3.0 KiB
HTML
82 lines
3.0 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en'>
|
|
<head>
|
|
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type" />
|
|
<link rel="stylesheet" type="text/css" href="style.css" />
|
|
<title>SOCI - structure</title>
|
|
</head>
|
|
|
|
<body>
|
|
<p class="banner">SOCI - The C++ Database Access Library</p>
|
|
|
|
<h2>Structure</h2>
|
|
|
|
<div class="diagram">
|
|
<img alt="Library structure diagram" src="structure.png" />
|
|
</div>
|
|
|
|
<p>The picture above presents the structure of the library, together with its
|
|
clients and servers. The boxes filled with cyan represent components that
|
|
are part of the library distribution.</p>
|
|
|
|
<p>The SOCI library is extensible in the following ways:</p>
|
|
<ul>
|
|
<li>More backends can be added to target various database servers.</li>
|
|
<li>More interfaces can be defined on top of common backend interface.</li>
|
|
<li>Other languages can use the <i>simple interface</i>, which was designed specifically
|
|
for the "C" calling convention to ensure easy binding.</li>
|
|
</ul>
|
|
|
|
<p>The core part of the library and the backend interface definition are
|
|
placed in the <code>core</code> directory of the library distribution.
|
|
The <code>soci-backend.h</code> file is an internal abstract
|
|
interface to the actual backends, which are needed to perform
|
|
operations on the given database server. Normally, the C++ client
|
|
program needs to interface with the <code>soci.h</code> header and the
|
|
header(s) relevant to the given backend(s) (for example, <code>soci-oracle.h</code>),
|
|
although with dynamic backend loading this can be avoided.
|
|
It is possible for the same program to use many backends at the same
|
|
time.</p>
|
|
|
|
<p>Everything in SOCI is
|
|
declared in the namespace <code>soci</code>.
|
|
All code examples presented in this documentation assume that your code
|
|
begins with something
|
|
like:</p>
|
|
<pre class="example">
|
|
#include "soci.h"
|
|
// other includes if necessary
|
|
|
|
using namespace soci;
|
|
|
|
// ...
|
|
</pre>
|
|
|
|
<div class="note">
|
|
<p><span class="note">Note:</span>
|
|
In simple programs, <code>#include</code> for the relevant
|
|
backend is needed only in the file where the <code>session</code>
|
|
object is created with explicit name of the backend factory.
|
|
The example program on the <a href="index.html">previous
|
|
page</a> shows the appropriate <code>#include</code> directive for the
|
|
Oracle backend. It is also possible to name backends at run-time
|
|
as part of the connection string, in which case no backend-specific
|
|
<code>#include</code> directive is necessary.</p>
|
|
</div>
|
|
|
|
<table class="foot-links" border="0" cellpadding="2" cellspacing="2">
|
|
<tr>
|
|
<td class="foot-link-left">
|
|
<a href="index.html">Previous (Contents)</a>
|
|
</td>
|
|
<td class="foot-link-right">
|
|
<a href="installation.html">Next (Installation)</a>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p class="copyright">Copyright © 2010 Mateusz Loskot</p>
|
|
<p class="copyright">Copyright © 2004-2011 Maciej Sobczak, Stephen Hutton</p>
|
|
</body>
|
|
</html>
|