ramdb/api/latex/dir_49e56c817e5e54854c35e136979f97ca.tex
Jacob Schmidt ee1dd91b7f
All checks were successful
Build / Build (push) Successful in 40s
feat: Add documentation for fetch function
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.
2025-03-30 17:16:31 -05:00

164 lines
9.6 KiB
TeX

\doxysection{docs Directory Reference}
\hypertarget{dir_49e56c817e5e54854c35e136979f97ca}{}\label{dir_49e56c817e5e54854c35e136979f97ca}\index{docs Directory Reference@{docs Directory Reference}}
\doxysubsubsection*{Directories}
\begin{DoxyCompactItemize}
\item
directory \mbox{\hyperlink{dir_2d423acf5473bc48906ca316d2995d8f}{basic}}
\item
directory \mbox{\hyperlink{dir_771164b9325b04f1442f7a3ffa8ecb89}{core}}
\item
directory \mbox{\hyperlink{dir_68588e5a097ce704ed28814d68b1b590}{hash}}
\item
directory \mbox{\hyperlink{dir_abd30d11711bae4cb17b258a1e3909ca}{list}}
\end{DoxyCompactItemize}
\doxysubsection{Detailed Description}
This documentation provides details on all functions available in {\ttfamily Arma\+RAMDb}. These functions allow you to interact with the in-\/memory database system for Arma 3.\hypertarget{README.md_autotoc_md424}{}\doxysubsection{\texorpdfstring{Function Categories}{Function Categories}}\label{README.md_autotoc_md424}
The functions are categorized by their purpose\+:\hypertarget{README.md_autotoc_md425}{}\doxysubsubsection{\texorpdfstring{Core Functions}{Core Functions}}\label{README.md_autotoc_md425}
\begin{DoxyItemize}
\item \doxysectlink{md_docs_2core_2init}{init}{0} -\/ Initialize the database system
\item \doxysectlink{md_docs_2core_2handler}{handler}{0} -\/ Handle callbacks from the extension
\item \doxysectlink{md_docs_2core_2process_queue}{process\+Queue}{0} -\/ Process queued database operations
\item \doxysectlink{md_docs_2core_2scheduler}{scheduler}{0} -\/ Schedule database operations
\item \doxysectlink{md_docs_2core_2add_task}{add\+Task}{0} -\/ Add a task to the scheduler
\item \doxysectlink{md_docs_2core_2print_addon_name}{print\+Addon\+Name}{0} -\/ Print the addon name
\item \doxysectlink{md_docs_2core_2test}{test}{0} -\/ Test the database connection
\end{DoxyItemize}\hypertarget{README.md_autotoc_md426}{}\doxysubsubsection{\texorpdfstring{Basic Data Operations}{Basic Data Operations}}\label{README.md_autotoc_md426}
\begin{DoxyItemize}
\item \doxysectlink{md_docs_2basic_2get}{get}{0} -\/ Get a value from the database
\item \doxysectlink{md_docs_2basic_2set}{set}{0} -\/ Set a value in the database
\item \doxysectlink{md_docs_2basic_2delete}{delete}{0} -\/ Delete a value from the database
\item \doxysectlink{md_docs_2basic_2save}{save}{0} -\/ Save the database to disk
\item \doxysectlink{md_docs_2basic_2load}{load}{0} -\/ Load the database from disk
\item \doxysectlink{md_docs_2basic_2fetch}{fetch}{0} -\/ Fetch a value from the database
\end{DoxyItemize}\hypertarget{README.md_autotoc_md427}{}\doxysubsubsection{\texorpdfstring{Hash Operations}{Hash Operations}}\label{README.md_autotoc_md427}
\begin{DoxyItemize}
\item \doxysectlink{md_docs_2hash_2hash_delete}{hash\+Delete}{0} -\/ Delete a hash
\item \doxysectlink{md_docs_2hash_2hash_delete_id}{hash\+Delete\+Id}{0} -\/ Delete a hash for a specific ID
\item \doxysectlink{md_docs_2hash_2hash_get}{hash\+Get}{0} -\/ Get a field from a hash
\item \doxysectlink{md_docs_2hash_2hash_get_all}{hash\+Get\+All}{0} -\/ Get all fields from a hash
\item \doxysectlink{md_docs_2hash_2hash_get_all_id}{hash\+Get\+All\+Id}{0} -\/ Get all fields from a hash for a specific ID
\item \doxysectlink{md_docs_2hash_2hash_get_id}{hash\+Get\+Id}{0} -\/ Get a field from a hash for a specific ID
\item \doxysectlink{md_docs_2hash_2hash_remove}{hash\+Remove}{0} -\/ Remove a field from a hash
\item \doxysectlink{md_docs_2hash_2hash_remove_id}{hash\+Remove\+Id}{0} -\/ Remove a field from a hash for a specific ID
\item \doxysectlink{md_docs_2hash_2hash_set}{hash\+Set}{0} -\/ Set a field in a hash
\item \doxysectlink{md_docs_2hash_2hash_set_bulk}{hash\+Set\+Bulk}{0} -\/ Set multiple fields in a hash in one operation
\item \doxysectlink{md_docs_2hash_2hash_set_id}{hash\+Set\+Id}{0} -\/ Set a field in a hash for a specific ID
\item \doxysectlink{md_docs_2hash_2hash_set_id_bulk}{hash\+Set\+Id\+Bulk}{0} -\/ Set multiple fields in a hash for a specific ID in one operation
\end{DoxyItemize}\hypertarget{README.md_autotoc_md428}{}\doxysubsubsection{\texorpdfstring{List Operations}{List Operations}}\label{README.md_autotoc_md428}
\begin{DoxyItemize}
\item \doxysectlink{md_docs_2list_2list_add}{list\+Add}{0} -\/ Add an item to a list
\item \doxysectlink{md_docs_2list_2list_delete}{list\+Delete}{0} -\/ Delete a list
\item \doxysectlink{md_docs_2list_2list_get}{list\+Get}{0} -\/ Get items from a list
\item \doxysectlink{md_docs_2list_2list_load}{list\+Load}{0} -\/ Load a list from the database
\item \doxysectlink{md_docs_2list_2list_remove}{list\+Remove}{0} -\/ Remove an item from a list
\item \doxysectlink{md_docs_2list_2list_set}{list\+Set}{0} -\/ Set an item in a list
\end{DoxyItemize}\hypertarget{README.md_autotoc_md429}{}\doxysubsection{\texorpdfstring{Usage Examples}{Usage Examples}}\label{README.md_autotoc_md429}
\hypertarget{README.md_autotoc_md430}{}\doxysubsubsection{\texorpdfstring{Basic Usage}{Basic Usage}}\label{README.md_autotoc_md430}
\begin{DoxyCode}{0}
\DoxyCodeLine{//\ Initialize\ the\ database}
\DoxyCodeLine{[]\ call\ ramdb\_db\_fnc\_init;}
\DoxyCodeLine{}
\DoxyCodeLine{//\ Set\ a\ value}
\DoxyCodeLine{["{}myKey"{},\ [myValue]]\ call\ ramdb\_db\_fnc\_set;}
\DoxyCodeLine{}
\DoxyCodeLine{//\ Get\ a\ value}
\DoxyCodeLine{["{}myKey"{},\ "{}myFunction"{}]\ call\ ramdb\_db\_fnc\_get;}
\DoxyCodeLine{}
\DoxyCodeLine{//\ Delete\ a\ key}
\DoxyCodeLine{["{}myKey"{}]\ call\ ramdb\_db\_fnc\_delete;}
\end{DoxyCode}
\hypertarget{README.md_autotoc_md431}{}\doxysubsubsection{\texorpdfstring{Hash Operations}{Hash Operations}}\label{README.md_autotoc_md431}
\begin{DoxyCode}{0}
\DoxyCodeLine{//\ Set\ a\ hash\ field\ (context\ mode)}
\DoxyCodeLine{["{}myField"{},\ [myValue]]\ call\ ramdb\_db\_fnc\_hashSet;}
\DoxyCodeLine{}
\DoxyCodeLine{//\ Get\ a\ hash\ field\ (context\ mode)}
\DoxyCodeLine{["{}myField"{},\ "{}myFunction"{}]\ call\ ramdb\_db\_fnc\_hashGet;}
\DoxyCodeLine{}
\DoxyCodeLine{//\ Get\ all\ hash\ fields\ (context\ mode)}
\DoxyCodeLine{["{}myFunction"{}]\ call\ ramdb\_db\_fnc\_hashGetAll;}
\DoxyCodeLine{}
\DoxyCodeLine{//\ Set\ multiple\ hash\ fields\ (context\ mode)}
\DoxyCodeLine{[[}
\DoxyCodeLine{\ \ \ \ "{}loadout"{},\ [getUnitLoadout\ player],}
\DoxyCodeLine{\ \ \ \ "{}position"{},\ [getPosASL\ player],}
\DoxyCodeLine{\ \ \ \ "{}direction"{},\ [getDir\ player],}
\DoxyCodeLine{\ \ \ \ "{}stance"{},\ [stance\ player]}
\DoxyCodeLine{]]\ call\ ramdb\_db\_fnc\_hashSetBulk;}
\DoxyCodeLine{}
\DoxyCodeLine{//\ Remove\ a\ hash\ field\ (context\ mode)}
\DoxyCodeLine{["{}myField"{}]\ call\ ramdb\_db\_fnc\_hashRemove;}
\DoxyCodeLine{}
\DoxyCodeLine{//\ Delete\ a\ hash\ table\ (context\ mode)}
\DoxyCodeLine{[]\ call\ ramdb\_db\_fnc\_hashDelete;}
\end{DoxyCode}
\begin{DoxyCode}{0}
\DoxyCodeLine{//\ Set\ a\ hash\ field\ for\ specific\ ID}
\DoxyCodeLine{["{}myHash"{},\ "{}myField"{},\ [myValue]]\ call\ ramdb\_db\_fnc\_hashSetId;}
\DoxyCodeLine{}
\DoxyCodeLine{//\ Get\ a\ hash\ field\ for\ specific\ ID}
\DoxyCodeLine{["{}myHash"{},\ "{}myField"{},\ "{}myFunction"{}]\ call\ ramdb\_db\_fnc\_hashGetId;}
\DoxyCodeLine{}
\DoxyCodeLine{//\ Get\ all\ hash\ fields\ for\ specific\ ID}
\DoxyCodeLine{["{}myHash"{}]\ call\ ramdb\_db\_fnc\_hashGetAllId;}
\DoxyCodeLine{}
\DoxyCodeLine{//\ Set\ multiple\ hash\ fields\ for\ specific\ ID}
\DoxyCodeLine{[[}
\DoxyCodeLine{\ \ \ \ getPlayerUID\ player,}
\DoxyCodeLine{\ \ \ \ "{}loadout"{},\ [getUnitLoadout\ player],}
\DoxyCodeLine{\ \ \ \ "{}position"{},\ [getPosASL\ player],}
\DoxyCodeLine{\ \ \ \ "{}direction"{},\ [getDir\ player],}
\DoxyCodeLine{\ \ \ \ "{}stance"{},\ [stance\ player]}
\DoxyCodeLine{]]\ call\ ramdb\_db\_fnc\_hashSetIdBulk;}
\DoxyCodeLine{}
\DoxyCodeLine{//\ Remove\ a\ hash\ field\ for\ specific\ ID}
\DoxyCodeLine{["{}myHash"{},\ "{}myField"{}]\ call\ ramdb\_db\_fnc\_hashRemoveId;}
\DoxyCodeLine{}
\DoxyCodeLine{//\ Delete\ a\ hash\ table\ for\ specific\ ID}
\DoxyCodeLine{["{}myHash"{}]\ call\ ramdb\_db\_fnc\_hashDeleteId;}
\end{DoxyCode}
\hypertarget{README.md_autotoc_md432}{}\doxysubsubsection{\texorpdfstring{List Operations}{List Operations}}\label{README.md_autotoc_md432}
\begin{DoxyCode}{0}
\DoxyCodeLine{//\ Add\ an\ item\ to\ a\ list}
\DoxyCodeLine{["{}myList"{},\ ["{}myItem"{}]]\ call\ ramdb\_db\_fnc\_listAdd;}
\DoxyCodeLine{}
\DoxyCodeLine{//\ Set\ an\ item\ from\ a\ list}
\DoxyCodeLine{["{}myList"{},\ 0,\ [myNewValue]]\ call\ ramdb\_db\_fnc\_listSet;}
\DoxyCodeLine{}
\DoxyCodeLine{//\ Get\ an\ item\ from\ a\ list}
\DoxyCodeLine{["{}myList"{},\ 0,\ "{}myFunction"{}]\ call\ ramdb\_db\_fnc\_listGet;}
\DoxyCodeLine{}
\DoxyCodeLine{//\ Get\ items\ from\ a\ list}
\DoxyCodeLine{["{}myList"{},\ "{}myFunction"{}]\ call\ ramdb\_db\_fnc\_listLoad;}
\DoxyCodeLine{}
\DoxyCodeLine{//\ Remove\ an\ item\ from\ a\ list}
\DoxyCodeLine{["{}myList"{},\ 0]\ call\ ramdb\_db\_fnc\_listRemove;}
\DoxyCodeLine{}
\DoxyCodeLine{//\ Delete\ a\ list}
\DoxyCodeLine{["{}myList"{}]\ call\ ramdb\_db\_fnc\_listDelete;}
\end{DoxyCode}
\hypertarget{README.md_autotoc_md433}{}\doxysubsection{\texorpdfstring{Function Documentation Structure}{Function Documentation Structure}}\label{README.md_autotoc_md433}
Each function documentation includes\+:
\begin{DoxyItemize}
\item Function name and purpose
\item Parameters
\item Return value
\item Examples
\item Notes and warnings
\end{DoxyItemize}\hypertarget{README.md_autotoc_md434}{}\doxysubsection{\texorpdfstring{License}{License}}\label{README.md_autotoc_md434}
This work is licensed under the Creative Commons Attribution-\/\+Non\+Commercial-\/\+Share\+Alike 4.\+0 International License. To view a copy of this license, visit \href{https://creativecommons.org/licenses/by-nc-sa/4.0/}{\texttt{ https\+://creativecommons.\+org/licenses/by-\/nc-\/sa/4.\+0/}} or send a letter to Creative Commons, ~\newline
PO Box 1866, Mountain View, CA 94042