
All checks were successful
Build / Build (push) Successful in 40s
This commit adds documentation for the `ramdb_db_fnc_fetch` function. The documentation explains the function's purpose, which is to handle data chunks received from the database extension when data is too large to be returned in a single callback. The documentation includes a title, icon, and excerpt for better readability and understanding.
175 lines
8.3 KiB
HTML
175 lines
8.3 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
|
<meta name="generator" content="Doxygen 1.13.2"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>ArmaRAMDb: set</title>
|
|
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="../../jquery.js"></script>
|
|
<script type="text/javascript" src="../../dynsections.js"></script>
|
|
<script type="text/javascript" src="../../clipboard.js"></script>
|
|
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="../../navtreedata.js"></script>
|
|
<script type="text/javascript" src="../../navtree.js"></script>
|
|
<script type="text/javascript" src="../../resize.js"></script>
|
|
<script type="text/javascript" src="../../cookie.js"></script>
|
|
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
|
<script type="text/javascript" src="../../search/search.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(function() { init_search(); });
|
|
/* @license-end */
|
|
</script>
|
|
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr id="projectrow">
|
|
<td id="projectalign">
|
|
<div id="projectname">ArmaRAMDb
|
|
</div>
|
|
</td>
|
|
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
|
<span class="left">
|
|
<span id="MSearchSelect" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()"> </span>
|
|
<input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
|
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
|
</span><span class="right">
|
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.svg" alt=""/></a>
|
|
</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.13.2 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(function() { codefold.init(1); });
|
|
/* @license-end */
|
|
</script>
|
|
</div><!-- top -->
|
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
|
<div id="nav-tree">
|
|
<div id="nav-tree-contents">
|
|
<div id="nav-sync" class="sync"></div>
|
|
</div>
|
|
</div>
|
|
<div id="splitbar" style="-moz-user-select:none;"
|
|
class="ui-resizable-handle">
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(function(){initNavTree('dc/d24/md_docs_2basic_2set.html','../../'); initResizable(true); });
|
|
/* @license-end */
|
|
</script>
|
|
<div id="doc-content">
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<div id="MSearchResults">
|
|
<div class="SRPage">
|
|
<div id="SRIndex">
|
|
<div id="SRResults"></div>
|
|
<div class="SRStatus" id="Loading">Loading...</div>
|
|
<div class="SRStatus" id="Searching">Searching...</div>
|
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div><div class="header">
|
|
<div class="headertitle"><div class="title">set</div></div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="textblock"><h2><a class="anchor" id="autotoc_md67"></a>
|
|
autotoc_md67</h2>
|
|
<p>title: ArmaRAMDb - Set Key icon: mdi:file-text-outline </p>
|
|
<h2><a class="anchor" id="autotoc_md68"></a>
|
|
excerpt: Set the value of stored key from RAMDb.</h2>
|
|
<h1><a class="anchor" id="autotoc_md69"></a>
|
|
ramdb_db_fnc_set</h1>
|
|
<h2><a class="anchor" id="autotoc_md70"></a>
|
|
Description</h2>
|
|
<p>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.</p>
|
|
<h2><a class="anchor" id="autotoc_md71"></a>
|
|
Syntax</h2>
|
|
<div class="fragment"><div class="line">[_key, _data] call ramdb_db_fnc_set</div>
|
|
</div><!-- fragment --><h2><a class="anchor" id="autotoc_md72"></a>
|
|
Parameters</h2>
|
|
<table class="markdownTable">
|
|
<tr class="markdownTableHead">
|
|
<th class="markdownTableHeadNone">Parameter </th><th class="markdownTableHeadNone">Type </th><th class="markdownTableHeadNone">Description </th><th class="markdownTableHeadNone">Default </th></tr>
|
|
<tr class="markdownTableRowOdd">
|
|
<td class="markdownTableBodyNone"><code>_key</code> </td><td class="markdownTableBodyNone">String </td><td class="markdownTableBodyNone">Name of the key to store the data under </td><td class="markdownTableBodyNone">"" </td></tr>
|
|
<tr class="markdownTableRowEven">
|
|
<td class="markdownTableBodyNone"><code>_data</code> </td><td class="markdownTableBodyNone">Array, String, Number, or Boolean </td><td class="markdownTableBodyNone">The value to store in the database </td><td class="markdownTableBodyNone">[] </td></tr>
|
|
</table>
|
|
<h2><a class="anchor" id="autotoc_md73"></a>
|
|
Return Value</h2>
|
|
<p>None. The operation runs asynchronously.</p>
|
|
<h2><a class="anchor" id="autotoc_md74"></a>
|
|
Examples</h2>
|
|
<h3><a class="anchor" id="autotoc_md75"></a>
|
|
Store a simple array:</h3>
|
|
<div class="fragment"><div class="line">["playerInventory", ["item1", "item2", "item3"]] call ramdb_db_fnc_set;</div>
|
|
</div><!-- fragment --><h3><a class="anchor" id="autotoc_md76"></a>
|
|
Store player data under their UID:</h3>
|
|
<div class="fragment"><div class="line">[getPlayerUID player, [name player, getPos player, getAllGear player]] call ramdb_db_fnc_set;</div>
|
|
</div><!-- fragment --><h3><a class="anchor" id="autotoc_md77"></a>
|
|
Call the set function remotely from a client:</h3>
|
|
<div class="fragment"><div class="line">["serverSetting", [true, 30, "normal"]] remoteExecCall ["ramdb_db_fnc_set", 2, false];</div>
|
|
</div><!-- fragment --><h2><a class="anchor" id="autotoc_md78"></a>
|
|
Notes</h2>
|
|
<ul>
|
|
<li>The function validates both the key and data before attempting to store</li>
|
|
<li>If the key already exists, its value will be overwritten</li>
|
|
<li>Complex data structures should be serialized into arrays</li>
|
|
<li>There are no size limits for data, but extremely large values might impact performance</li>
|
|
<li>For structured data, consider using hash tables instead of key-value pairs</li>
|
|
</ul>
|
|
<h2><a class="anchor" id="autotoc_md79"></a>
|
|
Related Functions</h2>
|
|
<ul>
|
|
<li><code>ramdb_db_fnc_get</code>: Retrieves a value by key</li>
|
|
<li><code>ramdb_db_fnc_delete</code>: Removes a value by key</li>
|
|
<li><code>ramdb_db_fnc_scheduler</code>: Processes the callback response</li>
|
|
</ul>
|
|
<h2><a class="anchor" id="autotoc_md80"></a>
|
|
Links</h2>
|
|
<p><a class="el" href="../../d6/dff/md_docs_2basic_2delete.html">Delete Key</a> | <a class="el" href="../../d1/d9f/md_docs_2basic_2get.html">Get Key</a> | <a class="el" href="../../dc/d24/md_docs_2basic_2set.html">Set Key</a> </p>
|
|
</div></div><!-- contents -->
|
|
</div><!-- PageDoc -->
|
|
</div><!-- doc-content -->
|
|
<!-- start footer part -->
|
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
|
<ul>
|
|
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.2 </li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|