[{"data":1,"prerenderedAt":485},["ShallowReactive",2],{"content-query-TAmDjriSqJ":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":7,"icon":9,"body":10,"_type":479,"_id":480,"_source":481,"_file":482,"_stem":483,"_extension":484},"/ramdb/main/addtask","main",false,"","ArmaRAMDb - Add Task","mdi:file-text-outline",{"type":11,"children":12,"toc":464},"root",[13,22,29,35,41,54,60,307,313,318,324,331,340,346,355,361,370,376,406,412],{"type":14,"tag":15,"props":16,"children":18},"element","h1",{"id":17},"ramdb_db_fnc_addtask",[19],{"type":20,"value":21},"text","ramdb_db_fnc_addTask",{"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},"Adds a task to the database operation queue. This function is used to schedule database operations that can be processed sequentially, providing a way to manage multiple database requests in an organized manner.",{"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","[_taskType, _key, _keyField, _index, _value, _function, _call, _netId] call ramdb_db_fnc_addTask\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,149,174,201,230,255,282],{"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},"_taskType",{"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},"Type of operation to perform (e.g., \"hgetall\")",{"type":14,"tag":100,"props":120,"children":121},{},[122],{"type":20,"value":123},"\"\"",{"type":14,"tag":69,"props":125,"children":126},{},[127,136,140,145],{"type":14,"tag":100,"props":128,"children":129},{},[130],{"type":14,"tag":50,"props":131,"children":133},{"className":132},[],[134],{"type":20,"value":135},"_key",{"type":14,"tag":100,"props":137,"children":138},{},[139],{"type":20,"value":113},{"type":14,"tag":100,"props":141,"children":142},{},[143],{"type":20,"value":144},"Name of the stored key",{"type":14,"tag":100,"props":146,"children":147},{},[148],{"type":20,"value":123},{"type":14,"tag":69,"props":150,"children":151},{},[152,161,165,170],{"type":14,"tag":100,"props":153,"children":154},{},[155],{"type":14,"tag":50,"props":156,"children":158},{"className":157},[],[159],{"type":20,"value":160},"_keyField",{"type":14,"tag":100,"props":162,"children":163},{},[164],{"type":20,"value":113},{"type":14,"tag":100,"props":166,"children":167},{},[168],{"type":20,"value":169},"Field name for hash operations",{"type":14,"tag":100,"props":171,"children":172},{},[173],{"type":20,"value":123},{"type":14,"tag":69,"props":175,"children":176},{},[177,186,191,196],{"type":14,"tag":100,"props":178,"children":179},{},[180],{"type":14,"tag":50,"props":181,"children":183},{"className":182},[],[184],{"type":20,"value":185},"_index",{"type":14,"tag":100,"props":187,"children":188},{},[189],{"type":20,"value":190},"Number",{"type":14,"tag":100,"props":192,"children":193},{},[194],{"type":20,"value":195},"Index for list operations",{"type":14,"tag":100,"props":197,"children":198},{},[199],{"type":20,"value":200},"-1",{"type":14,"tag":69,"props":202,"children":203},{},[204,213,218,223],{"type":14,"tag":100,"props":205,"children":206},{},[207],{"type":14,"tag":50,"props":208,"children":210},{"className":209},[],[211],{"type":20,"value":212},"_value",{"type":14,"tag":100,"props":214,"children":215},{},[216],{"type":20,"value":217},"Array, String, Number, or Boolean",{"type":14,"tag":100,"props":219,"children":220},{},[221],{"type":20,"value":222},"Value to store (for set operations)",{"type":14,"tag":100,"props":224,"children":225},{},[226],{"type":14,"tag":227,"props":228,"children":229},"span",{},[],{"type":14,"tag":69,"props":231,"children":232},{},[233,242,246,251],{"type":14,"tag":100,"props":234,"children":235},{},[236],{"type":14,"tag":50,"props":237,"children":239},{"className":238},[],[240],{"type":20,"value":241},"_function",{"type":14,"tag":100,"props":243,"children":244},{},[245],{"type":20,"value":113},{"type":14,"tag":100,"props":247,"children":248},{},[249],{"type":20,"value":250},"Name of function to call with the result",{"type":14,"tag":100,"props":252,"children":253},{},[254],{"type":20,"value":123},{"type":14,"tag":69,"props":256,"children":257},{},[258,267,272,277],{"type":14,"tag":100,"props":259,"children":260},{},[261],{"type":14,"tag":50,"props":262,"children":264},{"className":263},[],[265],{"type":20,"value":266},"_call",{"type":14,"tag":100,"props":268,"children":269},{},[270],{"type":20,"value":271},"Boolean",{"type":14,"tag":100,"props":273,"children":274},{},[275],{"type":20,"value":276},"Whether to call the function directly (true) or spawn (false)",{"type":14,"tag":100,"props":278,"children":279},{},[280],{"type":20,"value":281},"false",{"type":14,"tag":69,"props":283,"children":284},{},[285,294,298,303],{"type":14,"tag":100,"props":286,"children":287},{},[288],{"type":14,"tag":50,"props":289,"children":291},{"className":290},[],[292],{"type":20,"value":293},"_netId",{"type":14,"tag":100,"props":295,"children":296},{},[297],{"type":20,"value":113},{"type":14,"tag":100,"props":299,"children":300},{},[301],{"type":20,"value":302},"NetID of the target to receive the result",{"type":14,"tag":100,"props":304,"children":305},{},[306],{"type":20,"value":123},{"type":14,"tag":23,"props":308,"children":310},{"id":309},"return-value",[311],{"type":20,"value":312},"Return Value",{"type":14,"tag":30,"props":314,"children":315},{},[316],{"type":20,"value":317},"None. The task is added to the queue and processed asynchronously.",{"type":14,"tag":23,"props":319,"children":321},{"id":320},"examples",[322],{"type":20,"value":323},"Examples",{"type":14,"tag":325,"props":326,"children":328},"h3",{"id":327},"add-a-hash-table-retrieval-task",[329],{"type":20,"value":330},"Add a hash table retrieval task:",{"type":14,"tag":42,"props":332,"children":335},{"className":333,"code":334,"language":47,"meta":7},[45],"[\"hgetall\", \"\", \"\", -1, [], \"ramdb_db_fnc_test\"] call ramdb_db_fnc_addTask;\n",[336],{"type":14,"tag":50,"props":337,"children":338},{"__ignoreMap":7},[339],{"type":20,"value":334},{"type":14,"tag":325,"props":341,"children":343},{"id":342},"add-a-player-specific-task-that-returns-data-to-a-specific-client",[344],{"type":20,"value":345},"Add a player-specific task that returns data to a specific client:",{"type":14,"tag":42,"props":347,"children":350},{"className":348,"code":349,"language":47,"meta":7},[45],"[\"hgetallid\", getPlayerUID player, \"\", -1, [], \"ramdb_db_fnc_test\", false, netId player] remoteExecCall [\"ramdb_db_fnc_addTask\", 2, false];\n",[351],{"type":14,"tag":50,"props":352,"children":353},{"__ignoreMap":7},[354],{"type":20,"value":349},{"type":14,"tag":325,"props":356,"children":358},{"id":357},"add-a-list-operation-task",[359],{"type":20,"value":360},"Add a list operation task:",{"type":14,"tag":42,"props":362,"children":365},{"className":363,"code":364,"language":47,"meta":7},[45],"[\"listadd\", \"playerMessages\", \"\", -1, [\"New message content\"], \"\"] call ramdb_db_fnc_addTask;\n",[366],{"type":14,"tag":50,"props":367,"children":368},{"__ignoreMap":7},[369],{"type":20,"value":364},{"type":14,"tag":23,"props":371,"children":373},{"id":372},"notes",[374],{"type":20,"value":375},"Notes",{"type":14,"tag":377,"props":378,"children":379},"ul",{},[380,386,391,396,401],{"type":14,"tag":381,"props":382,"children":383},"li",{},[384],{"type":20,"value":385},"Tasks are processed in the order they are added to the queue",{"type":14,"tag":381,"props":387,"children":388},{},[389],{"type":20,"value":390},"If the queue is not currently being processed, this function will start the processing",{"type":14,"tag":381,"props":392,"children":393},{},[394],{"type":20,"value":395},"The task type determines which database operation will be performed",{"type":14,"tag":381,"props":397,"children":398},{},[399],{"type":20,"value":400},"This function is particularly useful for scheduling multiple related operations",{"type":14,"tag":381,"props":402,"children":403},{},[404],{"type":20,"value":405},"All operations performed through the task queue are logged for debugging",{"type":14,"tag":23,"props":407,"children":409},{"id":408},"links",[410],{"type":20,"value":411},"Links",{"type":14,"tag":30,"props":413,"children":414},{},[415,421,423,429,430,436,437,443,444,450,451,457,458],{"type":14,"tag":416,"props":417,"children":418},"a",{"href":4},[419],{"type":20,"value":420},"Add Task",{"type":20,"value":422}," |\n",{"type":14,"tag":416,"props":424,"children":426},{"href":425},"/ramdb/main/handler",[427],{"type":20,"value":428},"Handler",{"type":20,"value":422},{"type":14,"tag":416,"props":431,"children":433},{"href":432},"/ramdb/main/init",[434],{"type":20,"value":435},"Init",{"type":20,"value":422},{"type":14,"tag":416,"props":438,"children":440},{"href":439},"/ramdb/main/printaddonname",[441],{"type":20,"value":442},"Print Addon Name",{"type":20,"value":422},{"type":14,"tag":416,"props":445,"children":447},{"href":446},"/ramdb/main/processqueue",[448],{"type":20,"value":449},"Process Queue",{"type":20,"value":422},{"type":14,"tag":416,"props":452,"children":454},{"href":453},"/ramdb/main/scheduler",[455],{"type":20,"value":456},"Scheduler",{"type":20,"value":422},{"type":14,"tag":416,"props":459,"children":461},{"href":460},"/ramdb/main/test",[462],{"type":20,"value":463},"Test",{"title":7,"searchDepth":465,"depth":465,"links":466},2,[467,468,469,470,471,477,478],{"id":25,"depth":465,"text":28},{"id":37,"depth":465,"text":40},{"id":56,"depth":465,"text":59},{"id":309,"depth":465,"text":312},{"id":320,"depth":465,"text":323,"children":472},[473,475,476],{"id":327,"depth":474,"text":330},3,{"id":342,"depth":474,"text":345},{"id":357,"depth":474,"text":360},{"id":372,"depth":465,"text":375},{"id":408,"depth":465,"text":411},"markdown","content:ramdb:main:addTask.md","content","ramdb/main/addTask.md","ramdb/main/addTask","md",1742777961748]