[{"data":1,"prerenderedAt":339},["ShallowReactive",2],{"content-query-VapuYxlC6q":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":7,"icon":9,"body":10,"_type":333,"_id":334,"_source":335,"_file":336,"_stem":337,"_extension":338},"/ramdb/lists/listadd","lists",false,"","ArmaRAMDb - List Add","mdi:file-text-outline",{"type":11,"children":12,"toc":318},"root",[13,22,29,35,41,54,60,153,159,164,170,177,186,192,201,207,216,222,267,273],{"type":14,"tag":15,"props":16,"children":18},"element","h1",{"id":17},"ramdb_db_fnc_listadd",[19],{"type":20,"value":21},"text","ramdb_db_fnc_listAdd",{"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 an element to a list stored in the database under the specified key. This function appends values to an existing list or creates a new list if it doesn't exist. It's particularly useful for logging, event tracking, or maintaining collections of data that grow over time.",{"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 ramdb_db_fnc_listAdd\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 list to add the element to",{"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 insert into the list",{"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 synchronously to add the element to the list.",{"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},"add-an-event-log-entry",[175],{"type":20,"value":176},"Add an event log entry:",{"type":14,"tag":42,"props":178,"children":181},{"className":179,"code":180,"language":47,"meta":7},[45],"[\"events\", [\"Server state saved to DB \" + systemTimeUTC]] call ramdb_db_fnc_listAdd;\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},"add-a-player-message",[190],{"type":20,"value":191},"Add a player message:",{"type":14,"tag":42,"props":193,"children":196},{"className":194,"code":195,"language":47,"meta":7},[45],"[\"messages\", [name player + \": \" + _messageText]] call ramdb_db_fnc_listAdd;\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},"add-data-from-a-client",[205],{"type":20,"value":206},"Add data from a client:",{"type":14,"tag":42,"props":208,"children":211},{"className":209,"code":210,"language":47,"meta":7},[45],"[\"playerActions\", [getPlayerUID player, name player, \"logged in\"]] remoteExecCall [\"ramdb_db_fnc_listAdd\", 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,252,257,262],{"type":14,"tag":227,"props":228,"children":229},"li",{},[230],{"type":20,"value":231},"Elements are added to the end of the list in the order they are inserted",{"type":14,"tag":227,"props":233,"children":234},{},[235],{"type":20,"value":236},"If the list doesn't exist, it will be created automatically",{"type":14,"tag":227,"props":238,"children":239},{},[240],{"type":20,"value":241},"Both the key and data parameters are required and validated",{"type":14,"tag":227,"props":243,"children":244},{},[245],{"type":20,"value":246},"Lists can store various data types (arrays, strings, numbers, or booleans)",{"type":14,"tag":227,"props":248,"children":249},{},[250],{"type":20,"value":251},"Useful for maintaining a history of events, logs, or sequential data",{"type":14,"tag":227,"props":253,"children":254},{},[255],{"type":20,"value":256},"The operation is executed immediately and synchronously",{"type":14,"tag":227,"props":258,"children":259},{},[260],{"type":20,"value":261},"New elements are always added to the end of the list",{"type":14,"tag":227,"props":263,"children":264},{},[265],{"type":20,"value":266},"All operations are logged for debugging purposes",{"type":14,"tag":23,"props":268,"children":270},{"id":269},"links",[271],{"type":20,"value":272},"Links",{"type":14,"tag":30,"props":274,"children":275},{},[276,282,284,290,291,297,298,304,305,311,312],{"type":14,"tag":277,"props":278,"children":279},"a",{"href":4},[280],{"type":20,"value":281},"List Add",{"type":20,"value":283}," |\n",{"type":14,"tag":277,"props":285,"children":287},{"href":286},"/ramdb/lists/listdelete",[288],{"type":20,"value":289},"List Delete",{"type":20,"value":283},{"type":14,"tag":277,"props":292,"children":294},{"href":293},"/ramdb/lists/listget",[295],{"type":20,"value":296},"List Get",{"type":20,"value":283},{"type":14,"tag":277,"props":299,"children":301},{"href":300},"/ramdb/lists/listload",[302],{"type":20,"value":303},"List Load",{"type":20,"value":283},{"type":14,"tag":277,"props":306,"children":308},{"href":307},"/ramdb/lists/listremove",[309],{"type":20,"value":310},"List Remove",{"type":20,"value":283},{"type":14,"tag":277,"props":313,"children":315},{"href":314},"/ramdb/lists/listset",[316],{"type":20,"value":317},"List Set",{"title":7,"searchDepth":319,"depth":319,"links":320},2,[321,322,323,324,325,331,332],{"id":25,"depth":319,"text":28},{"id":37,"depth":319,"text":40},{"id":56,"depth":319,"text":59},{"id":155,"depth":319,"text":158},{"id":166,"depth":319,"text":169,"children":326},[327,329,330],{"id":173,"depth":328,"text":176},3,{"id":188,"depth":328,"text":191},{"id":203,"depth":328,"text":206},{"id":218,"depth":319,"text":221},{"id":269,"depth":319,"text":272},"markdown","content:ramdb:lists:listAdd.md","content","ramdb/lists/listAdd.md","ramdb/lists/listAdd","md",1742777961800]