dragonfly/docs/hash/hashGetAllId.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

71 lines
3.2 KiB
Markdown

---
title: ArmaDragonflyClient - Hash Get All ID
icon: mdi:file-text-outline
excerpt: Get all fields and values from the hash stored at key from DragonflyClient.
---
# dragonfly_db_fnc_hashGetAllId
## Description
Retrieves all fields and values from a specific hash table identified by its key. This function returns the complete hash table data for a specific ID through a callback function, allowing access to all stored key-value pairs associated with that ID. It's particularly useful for retrieving player-specific or entity-specific hash data.
## Syntax
```sqf
[_key, _function, _call, _netId] call dragonfly_db_fnc_hashGetAllId
```
## Parameters
| Parameter | Type | Description | Default |
|-------------|---------|------------------------------------------------------------|---------|
| `_key` | String | Identifier of the hash table to retrieve | "" |
| `_function` | String | Name of the function to receive the retrieved data | "" |
| `_call` | Boolean | Whether to call the function directly (true) or spawn (false) | false |
| `_netId` | String | (Optional) NetID of the player to receive the data | "" |
## Return Value
None. The retrieved data is passed to the specified callback function asynchronously.
## Examples
### Retrieve a player's complete hash data:
```sqf
[getPlayerUID player, "dragonfly_db_fnc_test"] call dragonfly_db_fnc_hashGetAllId;
```
### Retrieve vehicle data with synchronous callback:
```sqf
["vehicle_123", "dragonfly_db_fnc_processVehicleData", true] call dragonfly_db_fnc_hashGetAllId;
```
### Retrieve data and send it to a specific client:
```sqf
[getPlayerUID player, "dragonfly_db_fnc_test", false, netId player] remoteExecCall ["dragonfly_db_fnc_hashGetAllId", 2, false];
```
## Notes
- Returns the complete hash table with all fields and values as a nested array
- Both the key and callback function parameters are required and validated
- The data is retrieved asynchronously through the extension's callback system
- When a netId is provided, the data is sent to that specific client
- The `_call` parameter determines whether the function is called directly (synchronous) or spawned (asynchronous)
- This function retrieves from a specific hash table identified by `_key` - use `hashGetAll` for the global hash table
- Player UIDs are commonly used as keys to store player-specific data
- For large hash tables, retrieving all data may impact performance
- All operations are logged for debugging purposes
## Related Functions
- `dragonfly_db_fnc_hashGetAll`: Retrieves all fields from the global hash table
- `dragonfly_db_fnc_hashGetId`: Retrieves a specific field value from a specific hash table
- `dragonfly_db_fnc_hashGet`: Retrieves a specific field value from the global hash table
- `dragonfly_db_fnc_hashSetId`: Sets a field value in a specific hash table
- `dragonfly_db_fnc_scheduler`: Processes the callback from the database extension
## Links
[Hash Get](hashGet.md) |
[Hash Get All](hashGetAll.md) |
[Hash Get All ID](hashGetAllId.md) |
[Hash Get ID](hashGetId.md) |
[Hash Set](hashSet.md) |
[Hash Set Bulk](hashSetBulk.md) |
[Hash Set ID](hashSetId.md) |
[Hash Set ID Bulk](hashSetIdBulk.md)