
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.
62 lines
5.0 KiB
TeX
62 lines
5.0 KiB
TeX
\chapter{set}
|
|
\hypertarget{md_docs_2basic_2set}{}\label{md_docs_2basic_2set}\index{set@{set}}
|
|
\hypertarget{md_docs_2basic_2set_autotoc_md67}{}\doxysubsection{\texorpdfstring{autotoc\+\_\+md67}{autotoc\+\_\+md67}}\label{md_docs_2basic_2set_autotoc_md67}
|
|
title\+: Arma\+RAMDb -\/ Set Key icon\+: mdi\+:file-\/text-\/outline \hypertarget{md_docs_2basic_2set_autotoc_md68}{}\doxysubsection{\texorpdfstring{excerpt\+: Set the value of stored key from RAMDb.}{excerpt\+: Set the value of stored key from RAMDb.}}\label{md_docs_2basic_2set_autotoc_md68}
|
|
\hypertarget{md_docs_2basic_2set_autotoc_md69}{}\doxysection{\texorpdfstring{ramdb\+\_\+db\+\_\+fnc\+\_\+set}{ramdb\+\_\+db\+\_\+fnc\+\_\+set}}\label{md_docs_2basic_2set_autotoc_md69}
|
|
\hypertarget{md_docs_2basic_2set_autotoc_md70}{}\doxysubsection{\texorpdfstring{Description}{Description}}\label{md_docs_2basic_2set_autotoc_md70}
|
|
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.\hypertarget{md_docs_2basic_2set_autotoc_md71}{}\doxysubsection{\texorpdfstring{Syntax}{Syntax}}\label{md_docs_2basic_2set_autotoc_md71}
|
|
|
|
\begin{DoxyCode}{0}
|
|
\DoxyCodeLine{[\_key,\ \_data]\ call\ ramdb\_db\_fnc\_set}
|
|
|
|
\end{DoxyCode}
|
|
\hypertarget{md_docs_2basic_2set_autotoc_md72}{}\doxysubsection{\texorpdfstring{Parameters}{Parameters}}\label{md_docs_2basic_2set_autotoc_md72}
|
|
\tabulinesep=1mm
|
|
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
|
|
\hline
|
|
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default }\\\cline{1-4}
|
|
\endfirsthead
|
|
\hline
|
|
\endfoot
|
|
\hline
|
|
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default }\\\cline{1-4}
|
|
\endhead
|
|
{\ttfamily \+\_\+key} &String &Name of the key to store the data under &"{}"{} \\\cline{1-4}
|
|
{\ttfamily \+\_\+data} &Array, String, Number, or Boolean &The value to store in the database &\mbox{[}\mbox{]} \\\cline{1-4}
|
|
\end{longtabu}
|
|
\hypertarget{md_docs_2basic_2set_autotoc_md73}{}\doxysubsection{\texorpdfstring{Return Value}{Return Value}}\label{md_docs_2basic_2set_autotoc_md73}
|
|
None. The operation runs asynchronously.\hypertarget{md_docs_2basic_2set_autotoc_md74}{}\doxysubsection{\texorpdfstring{Examples}{Examples}}\label{md_docs_2basic_2set_autotoc_md74}
|
|
\hypertarget{md_docs_2basic_2set_autotoc_md75}{}\doxysubsubsection{\texorpdfstring{Store a simple array\+:}{Store a simple array\+:}}\label{md_docs_2basic_2set_autotoc_md75}
|
|
|
|
\begin{DoxyCode}{0}
|
|
\DoxyCodeLine{["{}playerInventory"{},\ ["{}item1"{},\ "{}item2"{},\ "{}item3"{}]]\ call\ ramdb\_db\_fnc\_set;}
|
|
|
|
\end{DoxyCode}
|
|
\hypertarget{md_docs_2basic_2set_autotoc_md76}{}\doxysubsubsection{\texorpdfstring{Store player data under their UID\+:}{Store player data under their UID\+:}}\label{md_docs_2basic_2set_autotoc_md76}
|
|
|
|
\begin{DoxyCode}{0}
|
|
\DoxyCodeLine{[getPlayerUID\ player,\ [name\ player,\ getPos\ player,\ getAllGear\ player]]\ call\ ramdb\_db\_fnc\_set;}
|
|
|
|
\end{DoxyCode}
|
|
\hypertarget{md_docs_2basic_2set_autotoc_md77}{}\doxysubsubsection{\texorpdfstring{Call the set function remotely from a client\+:}{Call the set function remotely from a client\+:}}\label{md_docs_2basic_2set_autotoc_md77}
|
|
|
|
\begin{DoxyCode}{0}
|
|
\DoxyCodeLine{["{}serverSetting"{},\ [true,\ 30,\ "{}normal"{}]]\ remoteExecCall\ ["{}ramdb\_db\_fnc\_set"{},\ 2,\ false];}
|
|
|
|
\end{DoxyCode}
|
|
\hypertarget{md_docs_2basic_2set_autotoc_md78}{}\doxysubsection{\texorpdfstring{Notes}{Notes}}\label{md_docs_2basic_2set_autotoc_md78}
|
|
|
|
\begin{DoxyItemize}
|
|
\item The function validates both the key and data before attempting to store
|
|
\item If the key already exists, its value will be overwritten
|
|
\item Complex data structures should be serialized into arrays
|
|
\item There are no size limits for data, but extremely large values might impact performance
|
|
\item For structured data, consider using hash tables instead of key-\/value pairs
|
|
\end{DoxyItemize}\hypertarget{md_docs_2basic_2set_autotoc_md79}{}\doxysubsection{\texorpdfstring{Related Functions}{Related Functions}}\label{md_docs_2basic_2set_autotoc_md79}
|
|
|
|
\begin{DoxyItemize}
|
|
\item {\ttfamily ramdb\+\_\+db\+\_\+fnc\+\_\+get}\+: Retrieves a value by key
|
|
\item {\ttfamily ramdb\+\_\+db\+\_\+fnc\+\_\+delete}\+: Removes a value by key
|
|
\item {\ttfamily ramdb\+\_\+db\+\_\+fnc\+\_\+scheduler}\+: Processes the callback response
|
|
\end{DoxyItemize}\hypertarget{md_docs_2basic_2set_autotoc_md80}{}\doxysubsection{\texorpdfstring{Links}{Links}}\label{md_docs_2basic_2set_autotoc_md80}
|
|
\doxysectlink{md_docs_2basic_2delete}{Delete Key}{0} \texorpdfstring{$\vert$}{|} \doxysectlink{md_docs_2basic_2get}{Get Key}{0} \texorpdfstring{$\vert$}{|} \doxysectlink{md_docs_2basic_2set}{Set Key}{0} |