
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.
181 lines
9.9 KiB
HTML
181 lines
9.9 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: hashSet</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('d0/d68/md_docs_2hash_2hash_set.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">hashSet</div></div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="textblock"><h2><a class="anchor" id="autotoc_md287"></a>
|
|
autotoc_md287</h2>
|
|
<p>title: ArmaRAMDb - Hash Set icon: mdi:file-text-outline </p>
|
|
<h2><a class="anchor" id="autotoc_md288"></a>
|
|
excerpt: Set a field value in the current client's hash table in RAMDb.</h2>
|
|
<h1><a class="anchor" id="autotoc_md289"></a>
|
|
ramdb_db_fnc_hashSet</h1>
|
|
<h2><a class="anchor" id="autotoc_md290"></a>
|
|
Description</h2>
|
|
<p>Sets the value of a specified field in the hash table associated with the current client/player. This function automatically determines the appropriate hash ID based on the caller's identity, making it more convenient than <code>hashSetId</code> which requires manually specifying an ID. It allows storing various data types (arrays, strings, numbers, or booleans) in a field of the client-specific hash structure.</p>
|
|
<h2><a class="anchor" id="autotoc_md291"></a>
|
|
Syntax</h2>
|
|
<div class="fragment"><div class="line">[_keyField, _data] call ramdb_db_fnc_hashSet</div>
|
|
</div><!-- fragment --><h2><a class="anchor" id="autotoc_md292"></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>_keyField</code> </td><td class="markdownTableBodyNone">String </td><td class="markdownTableBodyNone">Name of the field in the hash to set </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 hash field </td><td class="markdownTableBodyNone">[] </td></tr>
|
|
</table>
|
|
<h2><a class="anchor" id="autotoc_md293"></a>
|
|
Return Value</h2>
|
|
<p>None. The operation runs synchronously to store the data.</p>
|
|
<h2><a class="anchor" id="autotoc_md294"></a>
|
|
Examples</h2>
|
|
<h3><a class="anchor" id="autotoc_md295"></a>
|
|
Store a player's loadout:</h3>
|
|
<div class="fragment"><div class="line">["loadout", [getUnitLoadout player]] call ramdb_db_fnc_hashSet;</div>
|
|
</div><!-- fragment --><h3><a class="anchor" id="autotoc_md296"></a>
|
|
Store player preferences:</h3>
|
|
<div class="fragment"><div class="line">["settings", [true, 30, "normal"]] call ramdb_db_fnc_hashSet;</div>
|
|
</div><!-- fragment --><h3><a class="anchor" id="autotoc_md297"></a>
|
|
Store data from a client:</h3>
|
|
<div class="fragment"><div class="line">["clientInfo", [name player, getPlayerUID player]] remoteExecCall ["ramdb_db_fnc_hashSet", 2, false];</div>
|
|
</div><!-- fragment --><h2><a class="anchor" id="autotoc_md298"></a>
|
|
Notes</h2>
|
|
<ul>
|
|
<li>Stores a single field-value pair in the current client's hash table</li>
|
|
<li>Both the field name and data parameters are required and validated</li>
|
|
<li>If the field already exists, its value will be overwritten</li>
|
|
<li>Supports various data types: arrays, strings, numbers, and booleans</li>
|
|
<li>This function automatically determines which hash table to use based on the caller's identity</li>
|
|
<li>Use <code>hashSetId</code> when you need to specify a particular hash table by ID</li>
|
|
<li>Complex data structures should be serialized into arrays</li>
|
|
<li>The operation is executed immediately and synchronously</li>
|
|
<li>All operations are logged for debugging purposes</li>
|
|
</ul>
|
|
<h2><a class="anchor" id="autotoc_md299"></a>
|
|
Related Functions</h2>
|
|
<ul>
|
|
<li><code>ramdb_db_fnc_hashSetId</code>: Sets a field value in a specific hash table (when you need to specify the ID)</li>
|
|
<li><code>ramdb_db_fnc_hashGet</code>: Retrieves a field value from the current client's hash table</li>
|
|
<li><code>ramdb_db_fnc_hashGetAll</code>: Retrieves all fields from the current client's hash table</li>
|
|
<li><code>ramdb_db_fnc_hashSetBulk</code>: Sets multiple fields in the current client's hash table</li>
|
|
<li><code>ramdb_db_fnc_hashDelete</code>: Removes the current client's hash table</li>
|
|
</ul>
|
|
<h2><a class="anchor" id="autotoc_md300"></a>
|
|
Links</h2>
|
|
<p><a class="el" href="../../d7/d91/md_docs_2hash_2hash_delete.html">Hash Delete</a> | <a class="el" href="../../dc/d95/md_docs_2hash_2hash_delete_id.html">Hash Delete ID</a> | <a class="el" href="../../dc/dae/md_docs_2hash_2hash_get.html">Hash Get</a> | <a class="el" href="../../d8/d96/md_docs_2hash_2hash_get_all.html">Hash Get All</a> | <a class="el" href="../../d3/d33/md_docs_2hash_2hash_get_all_id.html">Hash Get All ID</a> | <a class="el" href="../../d5/d27/md_docs_2hash_2hash_get_id.html">Hash Get ID</a> | <a class="el" href="../../d9/d12/md_docs_2hash_2hash_remove.html">Hash Remove</a> | <a class="el" href="../../d9/dae/md_docs_2hash_2hash_remove_id.html">Hash Remove ID</a> | <a class="el" href="../../d0/d68/md_docs_2hash_2hash_set.html">Hash Set</a> | <a class="el" href="../../d9/dc1/md_docs_2hash_2hash_set_bulk.html">Hash Set Bulk</a> | <a class="el" href="../../dc/db9/md_docs_2hash_2hash_set_id.html">Hash Set ID</a> | <a class="el" href="../../d2/d02/md_docs_2hash_2hash_set_id_bulk.html">Hash Set ID Bulk</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>
|