<?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_2list_2list_delete" xml:lang="en-US">
<title>listDelete</title>
<indexterm><primary>listDelete</primary></indexterm>
<section xml:id="_md_docs_2list_2list_delete_1autotoc_md361">
<title>autotoc_md361</title>
<para>title: ArmaRAMDb - List Delete icon: mdi:file-text-outline </para>
</section>
<section xml:id="_md_docs_2list_2list_delete_1autotoc_md362">
<title>excerpt: Delete an entire list stored at a key from RAMDb.</title></section>
<section xml:id="_md_docs_2list_2list_delete_1autotoc_md363">
<title>ramdb_db_fnc_listDelete</title><section xml:id="_md_docs_2list_2list_delete_1autotoc_md364">
<title>Description</title>
<para>Completely removes a list and all its elements stored at a specified key from the RAMDb database. This function provides a way to delete entire collections of data at once, rather than removing individual elements. It is useful for cleaning up obsolete data, resetting collections, or removing temporary lists that are no longer needed.</para>
</section>
<section xml:id="_md_docs_2list_2list_delete_1autotoc_md365">
<title>Syntax</title>
<para><literallayout><computeroutput>[_key]&#32;call&#32;ramdb_db_fnc_listDelete
</computeroutput></literallayout></para>
</section>
<section xml:id="_md_docs_2list_2list_delete_1autotoc_md366">
<title>Parameters</title>
<para><informaltable frame="all">
    <tgroup cols="4" align="left" colsep="1" rowsep="1">
      <colspec colname='c1'/>
      <colspec colname='c2'/>
      <colspec colname='c3'/>
      <colspec colname='c4'/>
<thead>
      <row  class='markdownTableHead'>
<entry>
<para>Parameter   </para>
</entry><entry>
<para>Type   </para>
</entry><entry>
<para>Description   </para>
</entry><entry>
<para>Default    </para>
</entry></row>
</thead><tbody>
      <row  class='markdownTableRowOdd'>
<entry>
<para>_key   </para>
</entry><entry>
<para>String   </para>
</entry><entry>
<para>The key identifying the list to be deleted   </para>
</entry><entry>
<para>&quot;&quot;   </para>
</entry></row>
    </tbody>
    </tgroup>
</informaltable>
</para>
</section>
<section xml:id="_md_docs_2list_2list_delete_1autotoc_md367">
<title>Return Value</title>
<para>None. The operation runs synchronously to delete the list immediately.</para>
</section>
<section xml:id="_md_docs_2list_2list_delete_1autotoc_md368">
<title>Examples</title>
<para><emphasis role="bold">Delete an event log:</emphasis> <literallayout><computeroutput>[&quot;eventLog&quot;]&#32;call&#32;ramdb_db_fnc_listDelete;
</computeroutput></literallayout></para>

<para><emphasis role="bold">Remove temporary mission data:</emphasis> <literallayout><computeroutput>[&quot;tempMissionData&quot;]&#32;call&#32;ramdb_db_fnc_listDelete;
</computeroutput></literallayout></para>

<para><emphasis role="bold">Delete a list in multiplayer:</emphasis> <literallayout><computeroutput>[&quot;sharedTempData&quot;]&#32;remoteExecCall&#32;[&quot;ramdb_db_fnc_listDelete&quot;,&#32;2,&#32;false];
</computeroutput></literallayout></para>
</section>
<section xml:id="_md_docs_2list_2list_delete_1autotoc_md369">
<title>Notes</title>
<para><itemizedlist>
<listitem>
<para>This function deletes the entire list and all its elements associated with the specified key.</para>
</listitem><listitem>
<para>Unlike <computeroutput>listRemove</computeroutput>, which removes a single element by index, this function removes the complete list structure.</para>
</listitem><listitem>
<para>The <computeroutput>_key</computeroutput> parameter must be a non-empty string, otherwise the function will exit without performing any action.</para>
</listitem><listitem>
<para>Once a list is deleted, it cannot be recovered unless you have previously saved or backed up the data.</para>
</listitem><listitem>
<para>If you need to selectively remove elements while preserving the list structure, use <computeroutput>ramdb_db_fnc_listRemove</computeroutput> instead.</para>
</listitem><listitem>
<para>The deletion operation is permanent and cannot be undone.</para>
</listitem><listitem>
<para>All list operations are logged for debugging purposes.</para>
</listitem></itemizedlist>
</para>
</section>
<section xml:id="_md_docs_2list_2list_delete_1autotoc_md370">
<title>Related Functions</title>
<para><itemizedlist>
<listitem>
<para><computeroutput>ramdb_db_fnc_listAdd</computeroutput>: Adds an element to a list</para>
</listitem><listitem>
<para><computeroutput>ramdb_db_fnc_listGet</computeroutput>: Retrieves a specific element from a list</para>
</listitem><listitem>
<para><computeroutput>ramdb_db_fnc_listLoad</computeroutput>: Retrieves a range of elements from a list</para>
</listitem><listitem>
<para><computeroutput>ramdb_db_fnc_listSet</computeroutput>: Replaces a specific element in a list</para>
</listitem><listitem>
<para><computeroutput>ramdb_db_fnc_listRemove</computeroutput>: Removes a specific element from a list</para>
</listitem><listitem>
<para><computeroutput>ramdb_db_fnc_scheduler</computeroutput>: Processes the callback from the database extension</para>
</listitem></itemizedlist>
</para>
</section>
<section xml:id="_md_docs_2list_2list_delete_1autotoc_md371">
<title>Links</title>
<para><link linkend="_md_docs_2list_2list_add">List Add</link> | <link linkend="_md_docs_2list_2list_delete">List Delete</link> | <link linkend="_md_docs_2list_2list_get">List Get</link> | <link linkend="_md_docs_2list_2list_load">List Load</link> | <link linkend="_md_docs_2list_2list_remove">List Remove</link> | <link linkend="_md_docs_2list_2list_set">List Set</link> </para>
</section>
</section>
</section>
