<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="_md_docs_2basic_2load" xml:lang="en-US">
<title>load</title>
<indexterm><primary>load</primary></indexterm>
<section xml:id="_md_docs_2basic_2load_1autotoc_md36">
<title>autotoc_md36</title>
<para>title: ArmaRAMDb - Load DB icon: mdi:file-text-outline </para>
</section>
<section xml:id="_md_docs_2basic_2load_1autotoc_md37">
<title>excerpt: Load DB from disc.</title></section>
<section xml:id="_md_docs_2basic_2load_1autotoc_md38">
<title>ramdb_db_fnc_load</title><section xml:id="_md_docs_2basic_2load_1autotoc_md39">
<title>Description</title>
<para>Loads the database from disk storage. This function restores all data (key-value pairs, hash tables, and lists) from the previously saved database file.</para>
</section>
<section xml:id="_md_docs_2basic_2load_1autotoc_md40">
<title>Syntax</title>
<para><literallayout><computeroutput>[]&#32;call&#32;ramdb_db_fnc_load
</computeroutput></literallayout></para>
</section>
<section xml:id="_md_docs_2basic_2load_1autotoc_md41">
<title>Parameters</title>
<para>None. This function does not require any parameters.</para>
</section>
<section xml:id="_md_docs_2basic_2load_1autotoc_md42">
<title>Return Value</title>
<para>None. The operation runs synchronously and loads the database immediately.</para>
</section>
<section xml:id="_md_docs_2basic_2load_1autotoc_md43">
<title>Examples</title><section xml:id="_md_docs_2basic_2load_1autotoc_md44">
<title>Load the database on the server:</title>
<para><literallayout><computeroutput>[]&#32;call&#32;ramdb_db_fnc_load;
</computeroutput></literallayout></para>
</section>
<section xml:id="_md_docs_2basic_2load_1autotoc_md45">
<title>Call the load function remotely from a client:</title>
<para><literallayout><computeroutput>[]&#32;remoteExecCall&#32;[&quot;ramdb_db_fnc_load&quot;,&#32;2,&#32;false];
</computeroutput></literallayout></para>
</section>
</section>
<section xml:id="_md_docs_2basic_2load_1autotoc_md46">
<title>Notes</title>
<para><itemizedlist>
<listitem>
<para>This function should typically be called during server initialization</para>
</listitem><listitem>
<para>Any existing data in memory will be overwritten with the data from disk</para>
</listitem><listitem>
<para>If no database file exists, nothing will happen</para>
</listitem><listitem>
<para>Loading does not affect ongoing operations, but might replace values in memory</para>
</listitem><listitem>
<para>For safety, it&apos;s recommended to call this function only when necessary</para>
</listitem></itemizedlist>
</para>
</section>
<section xml:id="_md_docs_2basic_2load_1autotoc_md47">
<title>Related Functions</title>
<para><itemizedlist>
<listitem>
<para><computeroutput>ramdb_db_fnc_save</computeroutput>: Saves the database to disk</para>
</listitem></itemizedlist>
</para>
</section>
<section xml:id="_md_docs_2basic_2load_1autotoc_md48">
<title>Links</title>
<para><link linkend="_md_docs_2basic_2save">Save DB</link> | <link linkend="_md_docs_2basic_2load">Load DB</link> </para>
</section>
</section>
</section>
