70 lines
2.2 KiB
Markdown
70 lines
2.2 KiB
Markdown
---
|
|
title: ArmaRAMDb - Hash Delete ID
|
|
icon: mdi:file-text-outline
|
|
excerpt: Remove a specific hash table from database.
|
|
---
|
|
|
|
# ramdb_db_fnc_hashDeleteId
|
|
|
|
## Description
|
|
Removes a specific hash table from the database using its unique identifier. This function deletes all fields and values associated with the specified hash ID. Unlike the global `hashDelete` function, this operation only affects a single hash table entry.
|
|
|
|
## Syntax
|
|
```sqf
|
|
[_key] call ramdb_db_fnc_hashDeleteId
|
|
```
|
|
|
|
## Parameters
|
|
| Parameter | Type | Description | Default |
|
|
|-----------|--------|-------------------------------------|---------|
|
|
| `_key` | String | Identifier of the hash to be deleted | "" |
|
|
|
|
## Return Value
|
|
None. The operation runs synchronously to delete the specified hash table.
|
|
|
|
## Examples
|
|
### Delete a specific hash table:
|
|
```sqf
|
|
["playerStats"] call ramdb_db_fnc_hashDeleteId;
|
|
```
|
|
|
|
### Delete a player's hash data:
|
|
```sqf
|
|
[getPlayerUID player] call ramdb_db_fnc_hashDeleteId;
|
|
```
|
|
|
|
### Delete a hash table from a client:
|
|
```sqf
|
|
["vehicleData"] remoteExecCall ["ramdb_db_fnc_hashDeleteId", 2, false];
|
|
```
|
|
|
|
## Notes
|
|
- This operation only removes a single hash table identified by `_key`
|
|
- Cannot be undone unless you have a backup
|
|
- Validates that the key is not empty before proceeding
|
|
- All fields associated with the hash ID are removed
|
|
- Useful for clearing player-specific data or resetting entity data
|
|
- Executes immediately without confirmation
|
|
- Logs the operation for debugging purposes
|
|
|
|
## Related Functions
|
|
- `ramdb_db_fnc_hashDelete`: Removes all hash tables
|
|
- `ramdb_db_fnc_hashDeleteField`: Removes a specific field from a hash
|
|
- `ramdb_db_fnc_hashSetId`: Sets a value in a specific hash table
|
|
- `ramdb_db_fnc_hashGetId`: Retrieves a value from a specific hash table
|
|
- `ramdb_db_fnc_hashGetAllId`: Retrieves all fields from a specific hash table
|
|
|
|
## Links
|
|
|
|
[Hash Delete](hashDelete) |
|
|
[Hash Delete Field](hashDeleteField) |
|
|
[Hash Delete ID](hashDeleteId) |
|
|
[Hash Get](hashGet) |
|
|
[Hash Get All](hashGetAll) |
|
|
[Hash Get All ID](hashGetAllId) |
|
|
[Hash Get ID](hashGetId) |
|
|
[Hash Set](hashSet) |
|
|
[Hash Set Bulk](hashSetBulk) |
|
|
[Hash Set ID](hashSetId) |
|
|
[Hash Set ID Bulk](hashSetIdBulk)
|