feat(db): Add debug logging to all DragonflyDB functions
All checks were successful
Build / Build (push) Successful in 30s
All checks were successful
Build / Build (push) Successful in 30s
Enhanced debugging capabilities by adding conditional logging statements to all DragonflyDB functions. These logs include input parameters and return values, providing detailed insights into function execution. The logging is enabled only when the `__A3__DEBUG__` preprocessor directive is defined, ensuring minimal performance impact in production environments. This change improves the ability to diagnose issues and understand the flow of data within the DragonflyDB system.
This commit is contained in:
parent
94c6d7f506
commit
ce904a7978
@ -30,6 +30,12 @@
|
|||||||
|
|
||||||
params [["_key", "", [""]]];
|
params [["_key", "", [""]]];
|
||||||
|
|
||||||
if (_key == "") exitWith { diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_delete' Invalid Input for Key '%1'", _key]; };
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_delete' Key: '%1'", _key];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (_key == "") exitWith {
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_delete' Invalid Input for Key '%1'", _key];
|
||||||
|
};
|
||||||
|
|
||||||
"ArmaDragonflyClient" callExtension ["del", [_key]];
|
"ArmaDragonflyClient" callExtension ["del", [_key]];
|
@ -31,19 +31,38 @@
|
|||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
params [["_key", "", [""]], ["_function", "", [""]], ["_call", false, [false]], ["_netId", nil, [""]]];
|
params [["_key", "", [""]], ["_function", "", [""]], ["_call", false, [false]], ["_netId", "", [""]]];
|
||||||
|
|
||||||
if (_key == "" || _function == "") exitWith { diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_get' Invalid Input for Key '%1' or Function '%2'", _key, _function]; };
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_get' Key: '%1', Function: '%2', Call: '%3', NetId: '%4'", _key, _function, _call, _netId];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (_key == "" || _function == "") exitWith {
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_get' Invalid Input for Key '%1' or Function '%2'", _key, _function];
|
||||||
|
};
|
||||||
|
|
||||||
|
private _return = "";
|
||||||
|
|
||||||
|
if (_netId != "") then {
|
||||||
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_get' Using NetId: '%1'", _netId];
|
||||||
|
#endif
|
||||||
|
|
||||||
if ((!isNil "_netId") and (_netId isNotEqualTo "")) then {
|
|
||||||
if (_call) then {
|
if (_call) then {
|
||||||
_return = "ArmaDragonflyClient" callExtension ["get", [_key, _function, _netId, _call]];
|
_return = "ArmaDragonflyClient" callExtension ["get", [_key, _function, _netId, _call]];
|
||||||
[(_return select 0)] call FUNC(scheduler);
|
|
||||||
} else {
|
} else {
|
||||||
_return = "ArmaDragonflyClient" callExtension ["get", [_key, _function, _netId]];
|
_return = "ArmaDragonflyClient" callExtension ["get", [_key, _function, _netId]];
|
||||||
[(_return select 0)] call FUNC(scheduler);
|
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text "ArmaDragonflyClient: 'dragonfly_db_fnc_get' Using current player";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (_call) then {
|
||||||
|
_return = "ArmaDragonflyClient" callExtension ["get", [_key, _function, _call]];
|
||||||
|
} else {
|
||||||
_return = "ArmaDragonflyClient" callExtension ["get", [_key, _function]];
|
_return = "ArmaDragonflyClient" callExtension ["get", [_key, _function]];
|
||||||
[(_return select 0)] call FUNC(scheduler);
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
[(_return select 0)] call FUNC(scheduler);
|
@ -34,7 +34,13 @@
|
|||||||
|
|
||||||
params [["_uniqueID", "", [""]], ["_function", "", [""]], ["_call", false, [false]], ["_data", [], [[]]], ["_netId", nil, [""]]];
|
params [["_uniqueID", "", [""]], ["_function", "", [""]], ["_call", false, [false]], ["_data", [], [[]]], ["_netId", nil, [""]]];
|
||||||
|
|
||||||
if (_function == "" || count _data == 0) exitWith { diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_handler' Invalid Input for Function '%1' or Data '%2'", _function, _data]; };
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_handler' UniqueID: '%1', Function: '%2', Call: '%3', Data: '%4', NetId: '%5'", _uniqueID, _function, _call, _data, _netId];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (_function == "" || count _data == 0) exitWith {
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_handler' Invalid Input for Function '%1' or Data '%2'", _function, _data];
|
||||||
|
};
|
||||||
|
|
||||||
private _func = call compile format ["%1", _function];
|
private _func = call compile format ["%1", _function];
|
||||||
|
|
||||||
|
@ -31,19 +31,42 @@
|
|||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
params [["_keyField", "", [""]], ["_function", "", [""]], ["_call", false, [false]], ["_netId", nil, [""]]];
|
params [["_keyField", "", [""]], ["_function", "", [""]], ["_call", false, [false]], ["_netId", "", [""]]];
|
||||||
|
|
||||||
if (_keyField == "" || _function == "") exitWith { diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_hashGet' Invalid Input for KeyField '%1' or Function '%2'", _keyField, _function]; };
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_hashGet' KeyField: '%1', Function: '%2', Call: '%3', NetId: '%4'", _keyField, _function, _call, _netId];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (_keyField == "" || _function == "") exitWith {
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_hashGet' Invalid Input for KeyField '%1' or Function '%2'", _keyField, _function];
|
||||||
|
};
|
||||||
|
|
||||||
|
private _return = "";
|
||||||
|
|
||||||
|
if (_netId != "") then {
|
||||||
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_hashGet' Using NetId: '%1'", _netId];
|
||||||
|
#endif
|
||||||
|
|
||||||
if ((!isNil "_netId") and (_netId isNotEqualTo "")) then {
|
|
||||||
if (_call) then {
|
if (_call) then {
|
||||||
_return = "ArmaDragonflyClient" callExtension ["hget", [_keyField, _function, _netId, _call]];
|
_return = "ArmaDragonflyClient" callExtension ["hget", [_keyField, _function, _netId, _call]];
|
||||||
[(_return select 0)] call FUNC(scheduler);
|
|
||||||
} else {
|
} else {
|
||||||
_return = "ArmaDragonflyClient" callExtension ["hget", [_keyField, _function, _netId]];
|
_return = "ArmaDragonflyClient" callExtension ["hget", [_keyField, _function, _netId]];
|
||||||
[(_return select 0)] call FUNC(scheduler);
|
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text "ArmaDragonflyClient: 'dragonfly_db_fnc_hashGet' Using current player";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (_call) then {
|
||||||
|
_return = "ArmaDragonflyClient" callExtension ["hget", [_keyField, _function, _call]];
|
||||||
|
} else {
|
||||||
_return = "ArmaDragonflyClient" callExtension ["hget", [_keyField, _function]];
|
_return = "ArmaDragonflyClient" callExtension ["hget", [_keyField, _function]];
|
||||||
[(_return select 0)] call FUNC(scheduler);
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_hashGet' Return: '%1'", _return];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
[(_return select 0)] call FUNC(scheduler);
|
@ -30,19 +30,42 @@
|
|||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
params [["_function", "", [""]], ["_call", false, [false]], ["_netId", nil, [""]]];
|
params [["_function", "", [""]], ["_call", false, [false]], ["_netId", "", [""]]];
|
||||||
|
|
||||||
if (_function isEqualTo "") exitWith { diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_hashGetAll' Invalid Input for Function '%1'", _function]; };
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_hashGetAll' Function: '%1', Call: '%2', NetId: '%3'", _function, _call, _netId];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (_function isEqualTo "") exitWith {
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_hashGetAll' Invalid Input for Function '%1'", _function];
|
||||||
|
};
|
||||||
|
|
||||||
|
private _return = "";
|
||||||
|
|
||||||
|
if (_netId != "") then {
|
||||||
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_hashGetAll' Using NetId: '%1'", _netId];
|
||||||
|
#endif
|
||||||
|
|
||||||
if ((!isNil "_netId") and (_netId isNotEqualTo "")) then {
|
|
||||||
if (_call) then {
|
if (_call) then {
|
||||||
_return = "ArmaDragonflyClient" callExtension ["hgetall", [_function, _netId, _call]];
|
_return = "ArmaDragonflyClient" callExtension ["hgetall", [_function, _netId, _call]];
|
||||||
[(_return select 0)] call FUNC(scheduler);
|
|
||||||
} else {
|
} else {
|
||||||
_return = "ArmaDragonflyClient" callExtension ["hgetall", [_function, _netId]];
|
_return = "ArmaDragonflyClient" callExtension ["hgetall", [_function, _netId]];
|
||||||
[(_return select 0)] call FUNC(scheduler);
|
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text "ArmaDragonflyClient: 'dragonfly_db_fnc_hashGetAll' Using current player";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (_call) then {
|
||||||
|
_return = "ArmaDragonflyClient" callExtension ["hgetall", [_function, _call]];
|
||||||
|
} else {
|
||||||
_return = "ArmaDragonflyClient" callExtension ["hgetall", [_function]];
|
_return = "ArmaDragonflyClient" callExtension ["hgetall", [_function]];
|
||||||
[(_return select 0)] call FUNC(scheduler);
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_hashGetAll' Return: '%1'", _return];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
[(_return select 0)] call FUNC(scheduler);
|
@ -31,19 +31,42 @@
|
|||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
params [["_key", "", [""]], ["_function", "", [""]], ["_call", false, [false]], ["_netId", nil, [""]]];
|
params [["_key", "", [""]], ["_function", "", [""]], ["_call", false, [false]], ["_netId", "", [""]]];
|
||||||
|
|
||||||
if (_key == "" || _function == "") exitWith { diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_hashGetAllId' Invalid Input for Key '%1' or Function '%2'", _key, _function]; };
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_hashGetAllId' Key: '%1', Function: '%2', Call: '%3', NetId: '%4'", _key, _function, _call, _netId];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (_key == "" || _function == "") exitWith {
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_hashGetAllId' Invalid Input for Key '%1' or Function '%2'", _key, _function];
|
||||||
|
};
|
||||||
|
|
||||||
|
private _return = "";
|
||||||
|
|
||||||
|
if (_netId != "") then {
|
||||||
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_hashGetAllId' Using NetId: '%1'", _netId];
|
||||||
|
#endif
|
||||||
|
|
||||||
if ((!isNil "_netId") and (_netId isNotEqualTo "")) then {
|
|
||||||
if (_call) then {
|
if (_call) then {
|
||||||
_return = "ArmaDragonflyClient" callExtension ["hgetallid", [_key, _function, _netId, _call]];
|
_return = "ArmaDragonflyClient" callExtension ["hgetallid", [_key, _function, _netId, _call]];
|
||||||
[(_return select 0)] call FUNC(scheduler);
|
|
||||||
} else {
|
} else {
|
||||||
_return = "ArmaDragonflyClient" callExtension ["hgetallid", [_key, _function, _netId]];
|
_return = "ArmaDragonflyClient" callExtension ["hgetallid", [_key, _function, _netId]];
|
||||||
[(_return select 0)] call FUNC(scheduler);
|
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text "ArmaDragonflyClient: 'dragonfly_db_fnc_hashGetAllId' Using current player";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (_call) then {
|
||||||
|
_return = "ArmaDragonflyClient" callExtension ["hgetallid", [_key, _function, _call]];
|
||||||
|
} else {
|
||||||
_return = "ArmaDragonflyClient" callExtension ["hgetallid", [_key, _function]];
|
_return = "ArmaDragonflyClient" callExtension ["hgetallid", [_key, _function]];
|
||||||
[(_return select 0)] call FUNC(scheduler);
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_hashGetAllId' Return: '%1'", _return];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
[(_return select 0)] call FUNC(scheduler);
|
@ -32,19 +32,42 @@
|
|||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
params [["_key", "", [""]], ["_keyField", "", [""]], ["_function", "", [""]], ["_call", false, [false]], ["_netId", nil, [""]]];
|
params [["_key", "", [""]], ["_keyField", "", [""]], ["_function", "", [""]], ["_call", false, [false]], ["_netId", "", [""]]];
|
||||||
|
|
||||||
if (_key == "" || _keyField == "" || _function == "") exitWith { diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_hashGetId' Invalid Input for Key '%1', KeyField '%2' or Function '%3'", _key, _keyField, _function]; };
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_hashGetId' Key: '%1', KeyField: '%2', Function: '%3', Call: '%4', NetId: '%5'", _key, _keyField, _function, _call, _netId];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (_key == "" || _keyField == "" || _function == "") exitWith {
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_hashGetId' Invalid Input for Key '%1', KeyField '%2' or Function '%3'", _key, _keyField, _function];
|
||||||
|
};
|
||||||
|
|
||||||
|
private _return = "";
|
||||||
|
|
||||||
|
if (_netId != "") then {
|
||||||
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_hashGetId' Using NetId: '%1'", _netId];
|
||||||
|
#endif
|
||||||
|
|
||||||
if ((!isNil "_netId") and (_netId isNotEqualTo "")) then {
|
|
||||||
if (_call) then {
|
if (_call) then {
|
||||||
_return = "ArmaDragonflyClient" callExtension ["hgetid", [_key, _keyField, _function, _netId, _call]];
|
_return = "ArmaDragonflyClient" callExtension ["hgetid", [_key, _keyField, _function, _netId, _call]];
|
||||||
[(_return select 0)] call FUNC(scheduler);
|
|
||||||
} else {
|
} else {
|
||||||
_return = "ArmaDragonflyClient" callExtension ["hgetid", [_key, _keyField, _function, _netId]];
|
_return = "ArmaDragonflyClient" callExtension ["hgetid", [_key, _keyField, _function, _netId]];
|
||||||
[(_return select 0)] call FUNC(scheduler);
|
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text "ArmaDragonflyClient: 'dragonfly_db_fnc_hashGetId' Using current player";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (_call) then {
|
||||||
|
_return = "ArmaDragonflyClient" callExtension ["hgetid", [_key, _keyField, _function, _call]];
|
||||||
|
} else {
|
||||||
_return = "ArmaDragonflyClient" callExtension ["hgetid", [_key, _keyField, _function]];
|
_return = "ArmaDragonflyClient" callExtension ["hgetid", [_key, _keyField, _function]];
|
||||||
[(_return select 0)] call FUNC(scheduler);
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_hashGetId' Return: '%1'", _return];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
[(_return select 0)] call FUNC(scheduler);
|
@ -31,6 +31,12 @@
|
|||||||
|
|
||||||
params [["_keyField", "", [""]], ["_data", [], [[]]]];
|
params [["_keyField", "", [""]], ["_data", [], [[]]]];
|
||||||
|
|
||||||
if (_keyField == "" || count _data == 0) exitWith { diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_hashSet' Invalid Input for KeyField '%1' or Data '%2'", _keyField, _data]; };
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_hashSet' KeyField: '%1', Data: '%2'", _keyField, _data];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (_keyField == "" || count _data == 0) exitWith {
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_hashSet' Invalid Input for KeyField '%1' or Data '%2'", _keyField, _data];
|
||||||
|
};
|
||||||
|
|
||||||
"ArmaDragonflyClient" callExtension ["hset", [_keyField, _data]];
|
"ArmaDragonflyClient" callExtension ["hset", [_keyField, _data]];
|
@ -30,6 +30,12 @@
|
|||||||
|
|
||||||
params [["_data", [], [[]]]];
|
params [["_data", [], [[]]]];
|
||||||
|
|
||||||
if (count _data == 0) exitWith { diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_hashSetBulk' Invalid Input for Data '%1'", _data]; };
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_hashSetBulk' Data: %1", _data];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (count _data == 0) exitWith {
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_hashSetBulk' Invalid Input for Data '%1'", _data];
|
||||||
|
};
|
||||||
|
|
||||||
"ArmaDragonflyClient" callExtension ["hset", _data];
|
"ArmaDragonflyClient" callExtension ["hset", _data];
|
@ -32,6 +32,12 @@
|
|||||||
|
|
||||||
params [["_key", "", [""]], ["_keyField", "", [""]], ["_data", [], [[]]]];
|
params [["_key", "", [""]], ["_keyField", "", [""]], ["_data", [], [[]]]];
|
||||||
|
|
||||||
if (_key == "" || _keyField == "" || count _data == 0) exitWith { diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_hashSetId' Invalid Input for Key '%1', KeyField '%2' or Data '%3'", _key, _keyField, _data]; };
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_hashSetId' Key: '%1', KeyField: '%2', Data: '%3'", _key, _keyField, _data];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (_key == "" || _keyField == "" || count _data == 0) exitWith {
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_hashSetId' Invalid Input for Key '%1', KeyField '%2' or Data '%3'", _key, _keyField, _data];
|
||||||
|
};
|
||||||
|
|
||||||
"ArmaDragonflyClient" callExtension ["hsetid", [_key, _keyField, _data]];
|
"ArmaDragonflyClient" callExtension ["hsetid", [_key, _keyField, _data]];
|
@ -30,6 +30,12 @@
|
|||||||
|
|
||||||
params [["_data", [], [[]]]];
|
params [["_data", [], [[]]]];
|
||||||
|
|
||||||
if (count _data == 0) exitWith { diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_hashSetIdBulk' Invalid Input for Data '%1'", _data]; };
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_hashSetIdBulk' Data: %1", _data];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (count _data == 0) exitWith {
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_hashSetIdBulk' Invalid Input for Data '%1'", _data];
|
||||||
|
};
|
||||||
|
|
||||||
"ArmaDragonflyClient" callExtension ["hsetid", _data];
|
"ArmaDragonflyClient" callExtension ["hsetid", _data];
|
@ -31,6 +31,12 @@
|
|||||||
|
|
||||||
params [["_key", "", [""]], ["_data", [], [[]]]];
|
params [["_key", "", [""]], ["_data", [], [[]]]];
|
||||||
|
|
||||||
if (_key == "" || count _data == 0) exitWith { diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_listAdd' Invalid Input for Key '%1' or Data '%2'", _key, _data]; };
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_listAdd' Key: '%1', Data: '%2'", _key, _data];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (_key == "" || count _data == 0) exitWith {
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_listAdd' Invalid Input for Key '%1' or Data '%2'", _key, _data];
|
||||||
|
};
|
||||||
|
|
||||||
"ArmaDragonflyClient" callExtension ["listadd", [_key, _data]];
|
"ArmaDragonflyClient" callExtension ["listadd", [_key, _data]];
|
@ -32,19 +32,42 @@
|
|||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
params [["_key", "", [""]], ["_index", -1, [0]], ["_function", "", [""]], ["_call", false, [false]], ["_netId", nil, [""]]];
|
params [["_key", "", [""]], ["_index", -1, [0]], ["_function", "", [""]], ["_call", false, [false]], ["_netId", "", [""]]];
|
||||||
|
|
||||||
if (_key == "" || _function == "") exitWith { diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_listGet' Invalid Input for Key '%1' or Function '%2'", _key, _function]; };
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_listGet' Key: '%1', Index: '%2', Function: '%3', Call: '%4', NetId: '%5'", _key, _index, _function, _call, _netId];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (_key == "" || _function == "") exitWith {
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_listGet' Invalid Input for Key '%1' or Function '%2'", _key, _function];
|
||||||
|
};
|
||||||
|
|
||||||
|
private _return = "";
|
||||||
|
|
||||||
|
if (_netId != "") then {
|
||||||
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_listGet' Using NetId: '%1'", _netId];
|
||||||
|
#endif
|
||||||
|
|
||||||
if ((!isNil "_netId") and (_netId isNotEqualTo "")) then {
|
|
||||||
if (_call) then {
|
if (_call) then {
|
||||||
_return = "ArmaDragonflyClient" callExtension ["listidx", [_key, _index, _function, _netId, _call]];
|
_return = "ArmaDragonflyClient" callExtension ["listidx", [_key, _index, _function, _netId, _call]];
|
||||||
[(_return select 0)] call FUNC(scheduler);
|
|
||||||
} else {
|
} else {
|
||||||
_return = "ArmaDragonflyClient" callExtension ["listidx", [_key, _index, _function, _netId]];
|
_return = "ArmaDragonflyClient" callExtension ["listidx", [_key, _index, _function, _netId]];
|
||||||
[(_return select 0)] call FUNC(scheduler);
|
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text "ArmaDragonflyClient: 'dragonfly_db_fnc_listGet' Using current player";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (_call) then {
|
||||||
|
_return = "ArmaDragonflyClient" callExtension ["listidx", [_key, _index, _function, _call]];
|
||||||
|
} else {
|
||||||
_return = "ArmaDragonflyClient" callExtension ["listidx", [_key, _index, _function]];
|
_return = "ArmaDragonflyClient" callExtension ["listidx", [_key, _index, _function]];
|
||||||
[(_return select 0)] call FUNC(scheduler);
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_listGet' Return: '%1'", _return];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
[(_return select 0)] call FUNC(scheduler);
|
@ -31,19 +31,42 @@
|
|||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
params [["_key", "", [""]], ["_function", "", [""]], ["_call", false, [false]], ["_netId", nil, [""]]];
|
params [["_key", "", [""]], ["_function", "", [""]], ["_call", false, [false]], ["_netId", "", [""]]];
|
||||||
|
|
||||||
if (_key == "" || _function == "") exitWith { diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_listLoad' Invalid Input for Key '%1' or Function '%2'", _key, _function]; };
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_listLoad' Key: '%1', Function: '%2', Call: '%3', NetId: '%4'", _key, _function, _call, _netId];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (_key == "" || _function == "") exitWith {
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_listLoad' Invalid Input for Key '%1' or Function '%2'", _key, _function];
|
||||||
|
};
|
||||||
|
|
||||||
|
private _return = "";
|
||||||
|
|
||||||
|
if (_netId != "") then {
|
||||||
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_listLoad' Using NetId: '%1'", _netId];
|
||||||
|
#endif
|
||||||
|
|
||||||
if ((!isNil "_netId") and (_netId isNotEqualTo "")) then {
|
|
||||||
if (_call) then {
|
if (_call) then {
|
||||||
_return = "ArmaDragonflyClient" callExtension ["listrng", [_key, 0, -1, _function, _netId, _call]];
|
_return = "ArmaDragonflyClient" callExtension ["listrng", [_key, 0, -1, _function, _netId, _call]];
|
||||||
[(_return select 0)] call FUNC(scheduler);
|
|
||||||
} else {
|
} else {
|
||||||
_return = "ArmaDragonflyClient" callExtension ["listrng", [_key, 0, -1, _function, _netId]];
|
_return = "ArmaDragonflyClient" callExtension ["listrng", [_key, 0, -1, _function, _netId]];
|
||||||
[(_return select 0)] call FUNC(scheduler);
|
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text "ArmaDragonflyClient: 'dragonfly_db_fnc_listLoad' Using current player";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (_call) then {
|
||||||
|
_return = "ArmaDragonflyClient" callExtension ["listrng", [_key, 0, -1, _function, _call]];
|
||||||
|
} else {
|
||||||
_return = "ArmaDragonflyClient" callExtension ["listrng", [_key, 0, -1, _function]];
|
_return = "ArmaDragonflyClient" callExtension ["listrng", [_key, 0, -1, _function]];
|
||||||
[(_return select 0)] call FUNC(scheduler);
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_listLoad' Return: '%1'", _return];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
[(_return select 0)] call FUNC(scheduler);
|
@ -31,6 +31,12 @@
|
|||||||
|
|
||||||
params [["_key", "", [""]], ["_index", -1, [0]]];
|
params [["_key", "", [""]], ["_index", -1, [0]]];
|
||||||
|
|
||||||
if (_key == "") exitWith { diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_listRemove' Invalid Input for Key '%1'", _key]; };
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_listRemove' Key: '%1', Index: '%2'", _key, _index];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (_key == "") exitWith {
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_listRemove' Invalid Input for Key '%1'", _key];
|
||||||
|
};
|
||||||
|
|
||||||
"ArmaDragonflyClient" callExtension ["listrem", [_key, _index]];
|
"ArmaDragonflyClient" callExtension ["listrem", [_key, _index]];
|
@ -32,6 +32,12 @@
|
|||||||
|
|
||||||
params [["_key", "", [""]], ["_index", -1, [0]], ["_data", [], [[]]]];
|
params [["_key", "", [""]], ["_index", -1, [0]], ["_data", [], [[]]]];
|
||||||
|
|
||||||
if (_key == "" || count _data == 0) exitWith { diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_listSet' Invalid Input for Key '%1' or Data '%2'", _key, _data]; };
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_listSet' Key: '%1', Index: '%2', Data: '%3'", _key, _index, _data];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (_key == "" || count _data == 0) exitWith {
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_listSet' Invalid Input for Key '%1' or Data '%2'", _key, _data];
|
||||||
|
};
|
||||||
|
|
||||||
"ArmaDragonflyClient" callExtension ["listset", [_key, _index, _data]];
|
"ArmaDragonflyClient" callExtension ["listset", [_key, _index, _data]];
|
@ -20,7 +20,9 @@
|
|||||||
["uniqueID", "evetnType", "eventName", "index", "indextotal", "datachunk", "target"]
|
["uniqueID", "evetnType", "eventName", "index", "indextotal", "datachunk", "target"]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
diag_log _this;
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_pubSubFetch' Data: %1", _this];
|
||||||
|
#endif
|
||||||
|
|
||||||
params ["_uniqueID", "_eventType", "_eventName", "_index", "_total", "_datachunk", "_target"];
|
params ["_uniqueID", "_eventType", "_eventName", "_index", "_total", "_datachunk", "_target"];
|
||||||
|
|
||||||
|
@ -34,6 +34,10 @@
|
|||||||
|
|
||||||
params [["_uniqueID", "", [""]], ["_eventType", "", [""]], ["_eventName", "", [""]], ["_data", [], [[]]], ["_target", "", [""]]];
|
params [["_uniqueID", "", [""]], ["_eventType", "", [""]], ["_eventName", "", [""]], ["_data", [], [[]]], ["_target", "", [""]]];
|
||||||
|
|
||||||
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_pubSubHandler' Data: %1", _this];
|
||||||
|
#endif
|
||||||
|
|
||||||
switch (_eventType) do {
|
switch (_eventType) do {
|
||||||
case "global": {
|
case "global": {
|
||||||
[_eventName, _data] call CFUNC(globalEvent);
|
[_eventName, _data] call CFUNC(globalEvent);
|
||||||
|
@ -30,10 +30,11 @@
|
|||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
params [
|
params [["_channel", "", [""]], ["_message", [], [[], "", 0, true]]];
|
||||||
["_channel", "", [""]],
|
|
||||||
["_message", [], [[], "", 0, true]]
|
#ifdef __A3__DEBUG__
|
||||||
];
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_publish' Channel: '%1', Message: '%2'", _channel, _message];
|
||||||
|
#endif
|
||||||
|
|
||||||
if (_channel isEqualTo "") exitWith {
|
if (_channel isEqualTo "") exitWith {
|
||||||
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_publish' Invalid Input for Channel '%1'", _channel];
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_publish' Invalid Input for Channel '%1'", _channel];
|
||||||
|
@ -31,6 +31,12 @@
|
|||||||
|
|
||||||
params [["_key", "", [""]], ["_data", "", [[]]]];
|
params [["_key", "", [""]], ["_data", "", [[]]]];
|
||||||
|
|
||||||
if (_key == "" || _data == "") exitWith { diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_set' Invalid Input for Key '%1' or Data '%2'", _key, _data]; };
|
#ifdef __A3__DEBUG__
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_set' Key: '%1', Data: '%2'", _key, _data];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (_key == "" || isNil "_data") exitWith {
|
||||||
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_set' Invalid Input for Key '%1' or Data '%2'", _key, _data];
|
||||||
|
};
|
||||||
|
|
||||||
"ArmaDragonflyClient" callExtension ["set", [_key, _data]];
|
"ArmaDragonflyClient" callExtension ["set", [_key, _data]];
|
@ -32,12 +32,11 @@
|
|||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
params [
|
params [["_channel", "", [""]], ["_eventType", "global", [""]], ["_eventName", "", [""]], ["_target", nil, [""]]];
|
||||||
["_channel", "", [""]],
|
|
||||||
["_eventType", "global", [""]],
|
#ifdef __A3__DEBUG__
|
||||||
["_eventName", "", [""]],
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_subscribe' Channel: '%1', Event Type: '%2', Event Name: '%3', Target: '%4'", _channel, _eventType, _eventName, _target];
|
||||||
["_target", nil, [""]]
|
#endif
|
||||||
];
|
|
||||||
|
|
||||||
if (_channel isEqualTo "") exitWith {
|
if (_channel isEqualTo "") exitWith {
|
||||||
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_subscribe' Invalid Input for Channel '%1'", _channel];
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_subscribe' Invalid Input for Channel '%1'", _channel];
|
||||||
|
@ -32,4 +32,4 @@ _res = _this;
|
|||||||
dragonfly_db_test = _res;
|
dragonfly_db_test = _res;
|
||||||
|
|
||||||
hint format ["%1", _res];
|
hint format ["%1", _res];
|
||||||
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_test' Result: %1", _res];
|
diag_log text format ["ArmaDragonflyClient: 'dragonfly_db_fnc_test' Result: '%1'", _res];
|
Loading…
x
Reference in New Issue
Block a user