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>
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>InferBase__ResultsDatabase (InferBase.InferBase__ResultsDatabase)</title><linkrel="stylesheet"href="../../odoc.css"/><metacharset="utf-8"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><metaname="generator"content="doc-ock-html v1.0.0-1-g1fc9bf0"/></head><body><navid="top"><ahref="../index.html">Up</a>—<spanclass="package">package <ahref="../index.html">InferBase</a></span></nav><header><h1><spanclass="keyword">Module</span><spanclass="module-path">InferBase__ResultsDatabase</span></h1></header><divclass="spec val"id="val-database_filename"><ahref="#val-database_filename"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>database_filename : string</code></div><divclass="doc"><p>the relative path to the database from the results directory</p></div></div><divclass="spec val"id="val-database_fullpath"><ahref="#val-database_fullpath"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>database_fullpath : string</code></div><divclass="doc"><p>the absolute path to the database file</p></div></div><divclass="spec val"id="val-schema_hum"><ahref="#val-schema_hum"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>schema_hum : string</code></div><divclass="doc"><p>some human-readable string describing the tables</p></div></div><divclass="spec val"id="val-get_database"><ahref="#val-get_database"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>get_database : unit <spanclass="keyword">‑></span> Sqlite3.db</code></div><divclass="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 <codeclass="code">new_database_connection</code>).</p></div></div><divclass="spec val"id="val-reset_capture_tables"><ahref="#val-reset_capture_tables"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>reset_capture_tables : unit <spanclass="keyword">‑></span> unit</code></div><divclass="doc"><p>zero out the tables associated with capture data</p></div></div><divclass="spec val"id="val-new_database_connection"><ahref="#val-new_database_connection"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>new_database_connection : unit <spanclass="keyword">‑></span> unit</code></div><divclass="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><divclass="spec val"id="val-db_canonicalize"><ahref="#val-db_canonicalize"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>db_canonicalize : unit <spanclass="keyword">‑></span> unit</code></div><divclass="doc"><p>put the database on disk in deterministic form</p></div></div><divclass="spec val"id="val-db_close"><ahref="#val-db_close"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>db_close : unit <spanclass="keyword">‑></span> unit</code></div><divclass="doc"><p>close the current connection to the database</p></div></div><divclass="spec val"id="val-create_db"><ahref="#val-create_db"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>create_db : unit <spanclass="keyword">‑></span> unit</code></div><divclass="doc"><p>create the database file and initialize all the necessary tables</p></div></div><divclass="spec type"id="type-registered_stmt"><ahref="#type-registered_stmt"class="anchor"></a><divclass="def type"><code><spanclass="keyword">type </span>registered_stmt</code><code></code><code></code></div><divclass="doc"></div></div><divclass="spec val"id="val-register_statement"><ahref="#val-register_statement"class="anchor"></a><divclass="def val"><code><spanclass="keyword">val </span>register_statement : (<spanclass="type-var">'a</span>,unit,string,<ahref="index.html#type-registered_stmt">registered_stmt</a>)Base.format4 <spanclass="keyword">‑></span><spanclass="type-var">'a</span></code></div><divclass="doc"><p>Return a function unit -> 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 <codeclass="code">Sqlite3.finalize</code> on the returned
statement, or about generating new statements when the connection to the DB changes: this is all