ramdb/docs/list/listLoad.md
Jacob Schmidt 8c0e8144e5 docs: Update documentation links and function references
This commit updates the documentation to reflect the current function names and link structure. Specifically, it addresses the following:

*   Corrected internal links within the documentation to point to the correct markdown files (e.g., `hashDelete.md` instead of `hashDelete`).
*   Updated related function references to reflect the current function names and include missing functions.
*   Removed outdated function references.
*   Added `ramdb_db_fnc_scheduler` to related functions where appropriate.
*   Updated the links section to use the correct markdown file names.
2025-03-22 16:53:30 -05:00

3.0 KiB

title, icon, excerpt
title icon excerpt
ArmaRAMDb - List Load mdi:file-text-outline Get all elements of a list stored at a key from RAMDb.

ramdb_db_fnc_listLoad

Description

Retrieves all elements of a list stored at a specified key from the RAMDb database. This function is useful when you need to access the complete list data rather than individual elements, allowing operations on the entire dataset. The retrieved data is passed to a callback function for processing.

Syntax

[_key, _function, _call, _netId] call ramdb_db_fnc_listLoad

Parameters

Parameter Type Description Default
_key String The key identifying the list to be retrieved ""
_function String The name of the function that will receive the retrieved data ""
_call Boolean Whether to call the function in an unscheduled environment false
_netId String The NetID of the target to return data from the function (multiplayer only) ""

Return Value

No value is returned directly. The retrieved list data is passed to the specified callback function asynchronously.

Examples

Retrieve all event logs:

["events", "myProject_fnc_processEventLogs"] call ramdb_db_fnc_listLoad;

Retrieve a player list with synchronous callback:

["playerList", "myProject_fnc_processPlayerList", true] call ramdb_db_fnc_listLoad;

Send mission data to a specific client:

["missionData", "myProject_fnc_processMissionData", false, netId player] remoteExecCall ["ramdb_db_fnc_listLoad", 2, false];

Notes

  • This function retrieves the entire list stored at the specified key, making it useful when you need to process multiple elements together.
  • Both the _key and _function parameters are required. The function will exit without action if either is empty.
  • The retrieved data is processed asynchronously through the scheduler system and passed to the specified callback function.
  • For multiplayer scenarios, you can specify a target client using the _netId parameter to send the retrieved data to that specific client.
  • The _call parameter determines whether the callback function is executed in an unscheduled environment (true) or scheduled environment (false).
  • This function uses the underlying "listrng" extension with a range from 0 to -1, which retrieves all elements in the list.
  • All list operations are logged for debugging purposes.
  • ramdb_db_fnc_listAdd: Adds an element to a list
  • ramdb_db_fnc_listGet: Retrieves a specific element from a list
  • ramdb_db_fnc_listSet: Replaces a specific element in a list
  • ramdb_db_fnc_listRemove: Removes a specific element from a list
  • ramdb_db_fnc_listDelete: Deletes an entire list
  • ramdb_db_fnc_scheduler: Processes the callback from the database extension

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