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.

6 lines
5.2 KiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>InferBase__ResultsDatabase (InferBase.InferBase__ResultsDatabase)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><meta name="generator" content="doc-ock-html v1.0.0-1-g1fc9bf0"/></head><body><nav id="top"><a href="../index.html">Up</a> &mdash; <span class="package">package <a href="../index.html">InferBase</a></span></nav><header><h1><span class="keyword">Module</span> <span class="module-path">InferBase__ResultsDatabase</span></h1></header><div class="spec val" id="val-database_filename"><a href="#val-database_filename" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>database_filename : string</code></div><div class="doc"><p>the relative path to the database from the results directory</p></div></div><div class="spec val" id="val-database_fullpath"><a href="#val-database_fullpath" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>database_fullpath : string</code></div><div class="doc"><p>the absolute path to the database file</p></div></div><div class="spec val" id="val-schema_hum"><a href="#val-schema_hum" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>schema_hum : string</code></div><div class="doc"><p>some human-readable string describing the tables</p></div></div><div class="spec val" id="val-get_database"><a href="#val-get_database" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>get_database : unit <span class="keyword">&#8209;&gt;</span> Sqlite3.db</code></div><div class="doc"><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 class="code">new_database_connection</code>).</p></div></div><div class="spec val" id="val-reset_capture_tables"><a href="#val-reset_capture_tables" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>reset_capture_tables : unit <span class="keyword">&#8209;&gt;</span> unit</code></div><div class="doc"><p>zero out the tables associated with capture data</p></div></div><div class="spec val" id="val-new_database_connection"><a href="#val-new_database_connection" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>new_database_connection : unit <span class="keyword">&#8209;&gt;</span> unit</code></div><div class="doc"><p>Closes the previous connection to the database (if any), and opens a new one. Needed after calls to fork(2).</p></div></div><div class="spec val" id="val-db_canonicalize"><a href="#val-db_canonicalize" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>db_canonicalize : unit <span class="keyword">&#8209;&gt;</span> unit</code></div><div class="doc"><p>put the database on disk in deterministic form</p></div></div><div class="spec val" id="val-db_close"><a href="#val-db_close" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>db_close : unit <span class="keyword">&#8209;&gt;</span> unit</code></div><div class="doc"><p>close the current connection to the database</p></div></div><div class="spec val" id="val-create_db"><a href="#val-create_db" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>create_db : unit <span class="keyword">&#8209;&gt;</span> unit</code></div><div class="doc"><p>create the database file and initialize all the necessary tables</p></div></div><div class="spec type" id="type-registered_stmt"><a href="#type-registered_stmt" class="anchor"></a><div class="def type"><code><span class="keyword">type </span>registered_stmt</code><code></code><code></code></div><div class="doc"></div></div><div class="spec val" id="val-register_statement"><a href="#val-register_statement" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>register_statement : (<span class="type-var">'a</span>, unit, string, <a href="index.html#type-registered_stmt">registered_stmt</a>) Base.format4 <span class="keyword">&#8209;&gt;</span> <span class="type-var">'a</span></code></div><div class="doc"><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 class="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></div></div><div class="spec val" id="val-with_registered_statement"><a href="#val-with_registered_statement" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>with_registered_statement : <a href="index.html#type-registered_stmt">registered_stmt</a> <span class="keyword">&#8209;&gt;</span> f:(Sqlite3.db <span class="keyword">&#8209;&gt;</span> Sqlite3.stmt <span class="keyword">&#8209;&gt;</span> <span class="type-var">'a</span>) <span class="keyword">&#8209;&gt;</span> <span class="type-var">'a</span></code></div><div class="doc"></div></div></body></html>