G:/ids/dragonfly/docs Directory ReferenceG:/ids/dragonfly/docs Directory ReferenceDirectories directory basicdirectory coredirectory hashdirectory listDetailed DescriptionThis documentation provides details on all functions available in ArmaDragonflyClient. These functions allow you to interact with the in-memory database system for Arma 3.Function CategoriesThe functions are categorized by their purpose:Core Functionsinit - Initialize the database systemhandler - Handle callbacks from the extensionprocessQueue - Process queued database operationsscheduler - Schedule database operationsaddTask - Add a task to the schedulerprintAddonName - Print the addon nametest - Test the database connectionBasic Data Operationsget - Get a value from the databaseset - Set a value in the databasedelete - Delete a value from the databasesave - Save the database to diskfetch - Fetch a value from the databaseHash OperationshashGet - Get a field from a hashhashGetAll - Get all fields from a hashhashGetAllId - Get all fields from a hash for a specific IDhashGetId - Get a field from a hash for a specific IDhashSet - Set a field in a hashhashSetBulk - Set multiple fields in a hash in one operationhashSetId - Set a field in a hash for a specific IDhashSetIdBulk - Set multiple fields in a hash for a specific ID in one operationList OperationslistAdd - Add an item to a listlistGet - Get items from a listlistLoad - Load a list from the databaselistRemove - Remove an item from a listlistSet - Set an item in a listUsage ExamplesBasic Usage// Initialize the database
[] call dragonfly_db_fnc_init;
// Set a value
["myKey", [myValue]] call dragonfly_db_fnc_set;
// Get a value
["myKey", "myFunction"] call dragonfly_db_fnc_get;
// Delete a key
["myKey"] call dragonfly_db_fnc_delete;
Hash Operations// Set a hash field (context mode)
["myField", [myValue]] call dragonfly_db_fnc_hashSet;
// Get a hash field (context mode)
["myField", "myFunction"] call dragonfly_db_fnc_hashGet;
// Get all hash fields (context mode)
["myFunction"] call dragonfly_db_fnc_hashGetAll;
// Set multiple hash fields (context mode)
[[
"loadout", [getUnitLoadout player],
"position", [getPosASL player],
"direction", [getDir player],
"stance", [stance player]
]] call dragonfly_db_fnc_hashSetBulk;
// Remove a hash field (context mode)
["myField"] call dragonfly_db_fnc_hashRemove;
// Delete a hash table (context mode)
[] call dragonfly_db_fnc_hashDelete;
// Set a hash field for specific ID
["myHash", "myField", [myValue]] call dragonfly_db_fnc_hashSetId;
// Get a hash field for specific ID
["myHash", "myField", "myFunction"] call dragonfly_db_fnc_hashGetId;
// Get all hash fields for specific ID
["myHash"] call dragonfly_db_fnc_hashGetAllId;
// Set multiple hash fields for specific ID
[[
getPlayerUID player,
"loadout", [getUnitLoadout player],
"position", [getPosASL player],
"direction", [getDir player],
"stance", [stance player]
]] call dragonfly_db_fnc_hashSetIdBulk;
// Remove a hash field for specific ID
["myHash", "myField"] call dragonfly_db_fnc_hashRemoveId;
// Delete a hash table for specific ID
["myHash"] call dragonfly_db_fnc_hashDeleteId;
List Operations// Add an item to a list
["myList", ["myItem"]] call dragonfly_db_fnc_listAdd;
// Set an item from a list
["myList", 0, [myNewValue]] call dragonfly_db_fnc_listSet;
// Get an item from a list
["myList", 0, "myFunction"] call dragonfly_db_fnc_listGet;
// Get items from a list
["myList", "myFunction"] call dragonfly_db_fnc_listLoad;
// Remove an item from a list
["myList", 0] call dragonfly_db_fnc_listRemove;
// Delete a list
["myList"] call dragonfly_db_fnc_listDelete;
Function Documentation StructureEach function documentation includes:Function name and purposeParametersReturn valueExamplesNotes and warningsLicenseThis work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-sa/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042