ramdb/docs/list/listDelete.md
Jacob Schmidt 5b9f3402b6
All checks were successful
Build / Build (push) Successful in 30s
docs: add comprehensive documentation and usage examples for ramdb
2025-03-22 16:31:59 -05:00

2.1 KiB

title, icon, excerpt
title icon excerpt
ArmaRAMDb - List Delete mdi:file-text-outline Delete an entire list stored at a key from RAMDb.

ramdb_db_fnc_listDelete

Description

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.

Syntax

[_key] call ramdb_db_fnc_listDelete

Parameters

Parameter Type Description Default
_key String The key identifying the list to be deleted ""

Return Value

None. The operation runs synchronously to delete the list immediately.

Examples

Delete an event log:

["eventLog"] call ramdb_db_fnc_listDelete;

Remove temporary mission data:

["tempMissionData"] call ramdb_db_fnc_listDelete;

Delete a list in multiplayer:

["sharedTempData"] remoteExecCall ["ramdb_db_fnc_listDelete", 2, false];

Notes

  • This function deletes the entire list and all its elements associated with the specified key.
  • Unlike listRemove, which removes a single element by index, this function removes the complete list structure.
  • The _key parameter must be a non-empty string, otherwise the function will exit without performing any action.
  • Once a list is deleted, it cannot be recovered unless you have previously saved or backed up the data.
  • If you need to selectively remove elements while preserving the list structure, use ramdb_db_fnc_listRemove instead.
  • The deletion operation is permanent and cannot be undone.
  • All list operations are logged for debugging purposes.

List Add | List Get | List Load | List Remove | List Set | List Delete