You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
3.8 KiB

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IBase__ResultsDatabase (infer.IBase__ResultsDatabase)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.2"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> <a href="../index.html">infer</a> &#x00BB; IBase__ResultsDatabase</nav><h1>Module <code>IBase__ResultsDatabase</code></h1></header><dl><dt class="spec value" id="val-schema_hum"><a href="#val-schema_hum" class="anchor"></a><code><span class="keyword">val</span> schema_hum : string</code></dt><dd><p>some human-readable string describing the tables</p></dd></dl><dl><dt class="spec value" id="val-create_tables"><a href="#val-create_tables" class="anchor"></a><code><span class="keyword">val</span> create_tables : <span>?&#8288;prefix:string</span> <span>&#45;&gt;</span> Sqlite3.db <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-get_database"><a href="#val-get_database" class="anchor"></a><code><span class="keyword">val</span> get_database : unit <span>&#45;&gt;</span> Sqlite3.db</code></dt><dd><p>The results database. You should always use this function to access the database, as the connection to it may change during the execution (see <code>new_database_connection</code>).</p></dd></dl><dl><dt class="spec value" id="val-new_database_connection"><a href="#val-new_database_connection" class="anchor"></a><code><span class="keyword">val</span> new_database_connection : unit <span>&#45;&gt;</span> unit</code></dt><dd><p>Closes the previous connection to the database (if any), and opens a new one. Needed after calls to fork(2).</p></dd></dl><dl><dt class="spec value" id="val-db_close"><a href="#val-db_close" class="anchor"></a><code><span class="keyword">val</span> db_close : unit <span>&#45;&gt;</span> unit</code></dt><dd><p>close the current connection to the database</p></dd></dl><dl><dt class="spec value" id="val-create_db"><a href="#val-create_db" class="anchor"></a><code><span class="keyword">val</span> create_db : unit <span>&#45;&gt;</span> unit</code></dt><dd><p>create the database file and initialize all the necessary tables</p></dd></dl><dl><dt class="spec type" id="type-registered_stmt"><a href="#type-registered_stmt" class="anchor"></a><code><span class="keyword">type</span> registered_stmt</code></dt></dl><dl><dt class="spec value" id="val-register_statement"><a href="#val-register_statement" class="anchor"></a><code><span class="keyword">val</span> register_statement : <span><span>(<span class="type-var">'a</span>, unit, string, <a href="index.html#type-registered_stmt">registered_stmt</a>)</span> Base.format4</span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>Return a function unit -&gt; Sqlite3.stmt that can be called (once the DB has been initialized) to get the prepared statement corresponding to the current DB connection. Use this to prepare statements only once per DB connection.</p><p>In particular, clients of this need not worry about calling <code>Sqlite3.finalize</code> on the returned statement, or about generating new statements when the connection to the DB changes: this is all handled internally.</p></dd></dl><dl><dt class="spec value" id="val-with_registered_statement"><a href="#val-with_registered_statement" class="anchor"></a><code><span class="keyword">val</span> with_registered_statement : <a href="index.html#type-registered_stmt">registered_stmt</a> <span>&#45;&gt;</span> <span>f:<span>(Sqlite3.db <span>&#45;&gt;</span> Sqlite3.stmt <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span></span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt></dl></div></body></html>