[{"data":1,"prerenderedAt":302},["ShallowReactive",2],{"content-query-DxhI17EV1l":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":7,"icon":9,"body":10,"_type":296,"_id":297,"_source":298,"_file":299,"_stem":300,"_extension":301},"/dragonfly/generic/set","generic",false,"","ArmaDragonflyClient - Set Key","mdi:file-text-outline",{"type":11,"children":12,"toc":281},"root",[13,22,29,35,41,54,60,153,159,164,170,177,186,192,201,207,216,222,252,258],{"type":14,"tag":15,"props":16,"children":18},"element","h1",{"id":17},"set-key",[19],{"type":20,"value":21},"text","Set Key",{"type":14,"tag":23,"props":24,"children":26},"h2",{"id":25},"description",[27],{"type":20,"value":28},"Description",{"type":14,"tag":30,"props":31,"children":32},"p",{},[33],{"type":20,"value":34},"Stores a value in the database with the specified key. This function allows saving various data types (arrays, strings, numbers, or booleans) that can be retrieved later using the key.",{"type":14,"tag":23,"props":36,"children":38},{"id":37},"syntax",[39],{"type":20,"value":40},"Syntax",{"type":14,"tag":42,"props":43,"children":48},"pre",{"className":44,"code":46,"language":47,"meta":7},[45],"language-sqf","[_key, _data] call dragonfly_db_fnc_set\n","sqf",[49],{"type":14,"tag":50,"props":51,"children":52},"code",{"__ignoreMap":7},[53],{"type":20,"value":46},{"type":14,"tag":23,"props":55,"children":57},{"id":56},"parameters",[58],{"type":20,"value":59},"Parameters",{"type":14,"tag":61,"props":62,"children":63},"table",{},[64,92],{"type":14,"tag":65,"props":66,"children":67},"thead",{},[68],{"type":14,"tag":69,"props":70,"children":71},"tr",{},[72,78,83,87],{"type":14,"tag":73,"props":74,"children":75},"th",{},[76],{"type":20,"value":77},"Parameter",{"type":14,"tag":73,"props":79,"children":80},{},[81],{"type":20,"value":82},"Type",{"type":14,"tag":73,"props":84,"children":85},{},[86],{"type":20,"value":28},{"type":14,"tag":73,"props":88,"children":89},{},[90],{"type":20,"value":91},"Default",{"type":14,"tag":93,"props":94,"children":95},"tbody",{},[96,124],{"type":14,"tag":69,"props":97,"children":98},{},[99,109,114,119],{"type":14,"tag":100,"props":101,"children":102},"td",{},[103],{"type":14,"tag":50,"props":104,"children":106},{"className":105},[],[107],{"type":20,"value":108},"_key",{"type":14,"tag":100,"props":110,"children":111},{},[112],{"type":20,"value":113},"String",{"type":14,"tag":100,"props":115,"children":116},{},[117],{"type":20,"value":118},"Name of the key to store the data under",{"type":14,"tag":100,"props":120,"children":121},{},[122],{"type":20,"value":123},"\"\"",{"type":14,"tag":69,"props":125,"children":126},{},[127,136,141,146],{"type":14,"tag":100,"props":128,"children":129},{},[130],{"type":14,"tag":50,"props":131,"children":133},{"className":132},[],[134],{"type":20,"value":135},"_data",{"type":14,"tag":100,"props":137,"children":138},{},[139],{"type":20,"value":140},"Array, String, Number, or Boolean",{"type":14,"tag":100,"props":142,"children":143},{},[144],{"type":20,"value":145},"The value to store in the database",{"type":14,"tag":100,"props":147,"children":148},{},[149],{"type":14,"tag":150,"props":151,"children":152},"span",{},[],{"type":14,"tag":23,"props":154,"children":156},{"id":155},"return-value",[157],{"type":20,"value":158},"Return Value",{"type":14,"tag":30,"props":160,"children":161},{},[162],{"type":20,"value":163},"None. The operation runs asynchronously.",{"type":14,"tag":23,"props":165,"children":167},{"id":166},"examples",[168],{"type":20,"value":169},"Examples",{"type":14,"tag":171,"props":172,"children":174},"h3",{"id":173},"store-a-simple-array",[175],{"type":20,"value":176},"Store a simple array:",{"type":14,"tag":42,"props":178,"children":181},{"className":179,"code":180,"language":47,"meta":7},[45],"[\"playerInventory\", [\"item1\", \"item2\", \"item3\"]] call dragonfly_db_fnc_set;\n",[182],{"type":14,"tag":50,"props":183,"children":184},{"__ignoreMap":7},[185],{"type":20,"value":180},{"type":14,"tag":171,"props":187,"children":189},{"id":188},"store-player-data-under-their-uid",[190],{"type":20,"value":191},"Store player data under their UID:",{"type":14,"tag":42,"props":193,"children":196},{"className":194,"code":195,"language":47,"meta":7},[45],"[getPlayerUID player, [name player, getPos player, getAllGear player]] call dragonfly_db_fnc_set;\n",[197],{"type":14,"tag":50,"props":198,"children":199},{"__ignoreMap":7},[200],{"type":20,"value":195},{"type":14,"tag":171,"props":202,"children":204},{"id":203},"call-the-set-function-remotely-from-a-client",[205],{"type":20,"value":206},"Call the set function remotely from a client:",{"type":14,"tag":42,"props":208,"children":211},{"className":209,"code":210,"language":47,"meta":7},[45],"[\"serverSetting\", [true, 30, \"normal\"]] remoteExecCall [\"dragonfly_db_fnc_set\", 2, false];\n",[212],{"type":14,"tag":50,"props":213,"children":214},{"__ignoreMap":7},[215],{"type":20,"value":210},{"type":14,"tag":23,"props":217,"children":219},{"id":218},"notes",[220],{"type":20,"value":221},"Notes",{"type":14,"tag":223,"props":224,"children":225},"ul",{},[226,232,237,242,247],{"type":14,"tag":227,"props":228,"children":229},"li",{},[230],{"type":20,"value":231},"The function validates both the key and data before attempting to store",{"type":14,"tag":227,"props":233,"children":234},{},[235],{"type":20,"value":236},"If the key already exists, its value will be overwritten",{"type":14,"tag":227,"props":238,"children":239},{},[240],{"type":20,"value":241},"Complex data structures should be serialized into arrays",{"type":14,"tag":227,"props":243,"children":244},{},[245],{"type":20,"value":246},"There are no size limits for data, but extremely large values might impact performance",{"type":14,"tag":227,"props":248,"children":249},{},[250],{"type":20,"value":251},"For structured data, consider using hash tables instead of key-value pairs",{"type":14,"tag":23,"props":253,"children":255},{"id":254},"links",[256],{"type":20,"value":257},"Links",{"type":14,"tag":30,"props":259,"children":260},{},[261,268,270,276,277],{"type":14,"tag":262,"props":263,"children":265},"a",{"href":264},"/dragonfly/generic/delete",[266],{"type":20,"value":267},"Delete Key",{"type":20,"value":269}," |\n",{"type":14,"tag":262,"props":271,"children":273},{"href":272},"/dragonfly/generic/get",[274],{"type":20,"value":275},"Get Key",{"type":20,"value":269},{"type":14,"tag":262,"props":278,"children":279},{"href":4},[280],{"type":20,"value":21},{"title":7,"searchDepth":282,"depth":282,"links":283},2,[284,285,286,287,288,294,295],{"id":25,"depth":282,"text":28},{"id":37,"depth":282,"text":40},{"id":56,"depth":282,"text":59},{"id":155,"depth":282,"text":158},{"id":166,"depth":282,"text":169,"children":289},[290,292,293],{"id":173,"depth":291,"text":176},3,{"id":188,"depth":291,"text":191},{"id":203,"depth":291,"text":206},{"id":218,"depth":282,"text":221},{"id":254,"depth":282,"text":257},"markdown","content:dragonfly:generic:set.md","content","dragonfly/generic/set.md","dragonfly/generic/set","md",1742777962573]