
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.
58 lines
5.0 KiB
TeX
58 lines
5.0 KiB
TeX
\chapter{get}
|
|
\hypertarget{md_docs_2basic_2get}{}\label{md_docs_2basic_2get}\index{get@{get}}
|
|
\hypertarget{md_docs_2basic_2get_autotoc_md23}{}\doxysubsection{\texorpdfstring{autotoc\+\_\+md23}{autotoc\+\_\+md23}}\label{md_docs_2basic_2get_autotoc_md23}
|
|
title\+: Arma\+RAMDb -\/ Get Key icon\+: mdi\+:file-\/text-\/outline \hypertarget{md_docs_2basic_2get_autotoc_md24}{}\doxysubsection{\texorpdfstring{excerpt\+: Get the value of stored key from RAMDb.}{excerpt\+: Get the value of stored key from RAMDb.}}\label{md_docs_2basic_2get_autotoc_md24}
|
|
\hypertarget{md_docs_2basic_2get_autotoc_md25}{}\doxysection{\texorpdfstring{ramdb\+\_\+db\+\_\+fnc\+\_\+get}{ramdb\+\_\+db\+\_\+fnc\+\_\+get}}\label{md_docs_2basic_2get_autotoc_md25}
|
|
\hypertarget{md_docs_2basic_2get_autotoc_md26}{}\doxysubsection{\texorpdfstring{Description}{Description}}\label{md_docs_2basic_2get_autotoc_md26}
|
|
Retrieves the value of a stored key from the database. This function performs an asynchronous request to the database and passes the retrieved data to the specified callback function.\hypertarget{md_docs_2basic_2get_autotoc_md27}{}\doxysubsection{\texorpdfstring{Syntax}{Syntax}}\label{md_docs_2basic_2get_autotoc_md27}
|
|
|
|
\begin{DoxyCode}{0}
|
|
\DoxyCodeLine{[\_key,\ \_function,\ \_call,\ \_netId]\ call\ ramdb\_db\_fnc\_get}
|
|
|
|
\end{DoxyCode}
|
|
\hypertarget{md_docs_2basic_2get_autotoc_md28}{}\doxysubsection{\texorpdfstring{Parameters}{Parameters}}\label{md_docs_2basic_2get_autotoc_md28}
|
|
\tabulinesep=1mm
|
|
\begin{longtabu}spread 0pt [c]{*{3}{|X[-1]}|}
|
|
\hline
|
|
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }\\\cline{1-3}
|
|
\endfirsthead
|
|
\hline
|
|
\endfoot
|
|
\hline
|
|
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }\\\cline{1-3}
|
|
\endhead
|
|
{\ttfamily \+\_\+key} &String &Name of the stored key to retrieve from the database \\\cline{1-3}
|
|
{\ttfamily \+\_\+function} &String &Name of the function to call when data is retrieved \\\cline{1-3}
|
|
{\ttfamily \+\_\+call} &Boolean &Whether to call the function directly (true) or spawn (false) \\\cline{1-3}
|
|
{\ttfamily \+\_\+net\+Id} &String &(Optional) Net\+ID of the player to whom the data should be returned \\\cline{1-3}
|
|
\end{longtabu}
|
|
\hypertarget{md_docs_2basic_2get_autotoc_md29}{}\doxysubsection{\texorpdfstring{Return Value}{Return Value}}\label{md_docs_2basic_2get_autotoc_md29}
|
|
None. When data is retrieved, it will be passed to the specified function. The operation runs asynchronously.\hypertarget{md_docs_2basic_2get_autotoc_md30}{}\doxysubsection{\texorpdfstring{Examples}{Examples}}\label{md_docs_2basic_2get_autotoc_md30}
|
|
\hypertarget{md_docs_2basic_2get_autotoc_md31}{}\doxysubsubsection{\texorpdfstring{Retrieve data in singleplayer or on the server\+:}{Retrieve data in singleplayer or on the server\+:}}\label{md_docs_2basic_2get_autotoc_md31}
|
|
|
|
\begin{DoxyCode}{0}
|
|
\DoxyCodeLine{[getPlayerUID\ player,\ "{}ramdb\_db\_fnc\_test"{}]\ call\ ramdb\_db\_fnc\_get;}
|
|
|
|
\end{DoxyCode}
|
|
\hypertarget{md_docs_2basic_2get_autotoc_md32}{}\doxysubsubsection{\texorpdfstring{Retrieve data on the server and send to a specific client\+:}{Retrieve data on the server and send to a specific client\+:}}\label{md_docs_2basic_2get_autotoc_md32}
|
|
|
|
\begin{DoxyCode}{0}
|
|
\DoxyCodeLine{[getPlayerUID\ player,\ "{}ramdb\_db\_fnc\_test"{},\ false,\ netId\ player]\ remoteExecCall\ ["{}ramdb\_db\_fnc\_get"{},\ 2,\ false];}
|
|
|
|
\end{DoxyCode}
|
|
\hypertarget{md_docs_2basic_2get_autotoc_md33}{}\doxysubsection{\texorpdfstring{Notes}{Notes}}\label{md_docs_2basic_2get_autotoc_md33}
|
|
|
|
\begin{DoxyItemize}
|
|
\item The function exit with an error if the key or function parameters are empty
|
|
\item Data is processed through the scheduler system, which manages callback responses
|
|
\item For large data that exceeds buffer limits, it will be automatically chunked and reassembled
|
|
\item The callback function must be defined to accept the retrieved data
|
|
\item The {\ttfamily \+\_\+call} parameter determines whether the callback is executed directly or spawned in a separate thread
|
|
\end{DoxyItemize}\hypertarget{md_docs_2basic_2get_autotoc_md34}{}\doxysubsection{\texorpdfstring{Related Functions}{Related Functions}}\label{md_docs_2basic_2get_autotoc_md34}
|
|
|
|
\begin{DoxyItemize}
|
|
\item {\ttfamily ramdb\+\_\+db\+\_\+fnc\+\_\+set}\+: Stores 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_2get_autotoc_md35}{}\doxysubsection{\texorpdfstring{Links}{Links}}\label{md_docs_2basic_2get_autotoc_md35}
|
|
\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} |