ramdb/docs/basic/load.md
Jacob Schmidt 5b9f3402b6
All checks were successful
Build / Build (push) Successful in 30s
docs: add comprehensive documentation and usage examples for ramdb
2025-03-22 16:31:59 -05:00

1.2 KiB

title, icon, excerpt
title icon excerpt
ArmaRAMDb - Load DB mdi:file-text-outline Load DB from disc.

ramdb_db_fnc_load

Description

Loads the database from disk storage. This function restores all data (key-value pairs, hash tables, and lists) from the previously saved database file.

Syntax

[] call ramdb_db_fnc_load

Parameters

None. This function does not require any parameters.

Return Value

None. The operation runs synchronously and loads the database immediately.

Examples

Load the database on the server:

[] call ramdb_db_fnc_load;

Call the load function remotely from a client:

[] remoteExecCall ["ramdb_db_fnc_load", 2, false];

Notes

  • This function should typically be called during server initialization
  • Any existing data in memory will be overwritten with the data from disk
  • If no database file exists, nothing will happen
  • Loading does not affect ongoing operations, but might replace values in memory
  • For safety, it's recommended to call this function only when necessary
  • ramdb_db_fnc_save: Saves the database to disk
  • ramdb_db_fnc_isLoaded: Checks if the database has been loaded

Save DB | Load DB