ramdb/docs/core/test.md
Jacob Schmidt 8c0e8144e5 docs: Update documentation links and function references
This commit updates the documentation to reflect the current function names and link structure. Specifically, it addresses the following:

*   Corrected internal links within the documentation to point to the correct markdown files (e.g., `hashDelete.md` instead of `hashDelete`).
*   Updated related function references to reflect the current function names and include missing functions.
*   Removed outdated function references.
*   Added `ramdb_db_fnc_scheduler` to related functions where appropriate.
*   Updated the links section to use the correct markdown file names.
2025-03-22 16:53:30 -05:00

1.9 KiB

title, icon, excerpt
title icon excerpt
ArmaRAMDb - Test mdi:file-text-outline Test Function.

ramdb_db_fnc_test

Description

A simple test function for verifying database operations. This function displays the received data in a hint message and logs it to the RPT file. It's primarily used for testing database retrieval operations and callback functionality.

Syntax

[_value] spawn ramdb_db_fnc_test

Parameters

Parameter Type Description Default
_value Array, String, Number, or Boolean The value to display and log []

Return Value

The same value that was passed to the function. Also sets the global variable ramdb_db_test to this value.

Examples

Test with a simple string:

["Hello World!"] spawn ramdb_db_fnc_test;

Test database retrieval by specifying this as callback function:

["playerStats", "ramdb_db_fnc_test"] call ramdb_db_fnc_get;

Test from client to server:

["Database is working!"] remoteExec ["ramdb_db_fnc_test", 2, false];

Notes

  • Displays the received value using hint
  • Logs the same value to the RPT file
  • Stores the value in the global variable ramdb_db_test for later inspection
  • Commonly used as a callback function for database operations
  • Useful for debugging and verifying data flow
  • Can be called directly or specified as a callback in other functions
  • ramdb_db_fnc_get: Retrieves values from the database
  • ramdb_db_fnc_handler: Routes data to callback functions
  • ramdb_db_fnc_scheduler: Manages the callback system

Add Task | Handler | Init | Print Addon Name | Process Queue | Scheduler | Test