dragonfly/docs/hash/README.md
Jacob Schmidt c8d81ba3bb
All checks were successful
Build / Build (push) Successful in 39s
docs: Update README.md with detailed documentation
This commit significantly enhances the `README.md` file, providing comprehensive documentation for the ArmaDragonflyClient.

Key changes:

*   **Detailed Function Categories:** Categorized functions for better organization (Core, Basic Data Operations, Hash Operations, List Operations).
*   **Usage Examples:** Added clear and concise usage examples for basic operations, hash operations (context and ID-specific), and list operations.
*   **Function Documentation Structure:** Outlined the structure for individual function documentation.
*   **License Information:** Updated the license information.
2025-03-30 17:15:35 -05:00

41 lines
1.5 KiB
Markdown

# Hash Operations
This section contains documentation for the hash operations of ArmaDragonflyClient that allow for working with hash tables (key-value pairs within a namespace).
## Available Functions
- [hashGet](hashGet.md) - Get a field from a hash
- [hashGetAll](hashGetAll.md) - Get all fields from a hash
- [hashGetAllId](hashGetAllId.md) - Get all fields from a hash for a specific ID
- [hashGetId](hashGetId.md) - Get a field from a hash for a specific ID
- [hashSet](hashSet.md) - Set a field in a hash
- [hashSetBulk](hashSetBulk.md) - Set multiple fields in a hash in one operation
- [hashSetId](hashSetId.md) - Set a field in a hash for a specific ID
- [hashSetIdBulk](hashSetIdBulk.md) - Set multiple fields in a hash for a specific ID in one operation
## Example Usage
```sqf
// Context mode examples
["myField", [myValue]] call dragonfly_db_fnc_hashSet;
["myField", "myFunction"] call dragonfly_db_fnc_hashGet;
["myFunction"] call dragonfly_db_fnc_hashGetAll;
// Set multiple hash fields in one operation
[[
"loadout", [getUnitLoadout player],
"position", [getPosASL player],
"direction", [getDir player]
]] call dragonfly_db_fnc_hashSetBulk;
// ID-specific examples
["myHash", "myField", [myValue]] call dragonfly_db_fnc_hashSetId;
["myHash", "myField", "myFunction"] call dragonfly_db_fnc_hashGetId;
["myHash"] call dragonfly_db_fnc_hashGetAllId;
```
## Related Categories
- [Core Functions](../core/README.md)
- [Basic Data Operations](../basic/README.md)
- [List Operations](../list/README.md)