ramdb/docs/hash/index.md
Jacob Schmidt 6d51f2e333 fix: Update documentation for consistency and accuracy
This commit enhances the documentation by ensuring consistency in function references and correcting inaccuracies. Key changes include:

*   Updated function names and references throughout the documentation.
*   Corrected internal links to point to the appropriate markdown files.
*   Removed outdated references to improve clarity and relevance.
2025-03-22 20:05:28 -05:00

1.9 KiB

Hash Operations

This section contains documentation for the hash operations of ArmaRAMDb that allow for working with hash tables (key-value pairs within a namespace).

Available Functions

Example Usage

// Context mode examples
["myField", [myValue]] call ramdb_db_fnc_hashSet;
["myField", "myFunction"] call ramdb_db_fnc_hashGet;
["myFunction"] call ramdb_db_fnc_hashGetAll;
["myField"] call ramdb_db_fnc_hashRemove;
[] call ramdb_db_fnc_hashDelete;

// Set multiple hash fields in one operation
[[
    "loadout", [getUnitLoadout player],
    "position", [getPosASL player],
    "direction", [getDir player]
]] call ramdb_db_fnc_hashSetBulk;

// ID-specific examples
["myHash", "myField", [myValue]] call ramdb_db_fnc_hashSetId;
["myHash", "myField", "myFunction"] call ramdb_db_fnc_hashGetId;
["myHash"] call ramdb_db_fnc_hashGetAllId;
["myHash", "myField"] call ramdb_db_fnc_hashRemoveId;
["myHash"] call ramdb_db_fnc_hashDeleteId;