database
Note
Database files are stored in ev0lve/databases/
directory. File format is json
.
load
database.load(name: string)
-> any
Loads a database file and returns the contents as table, string, number or nil on failure.
Parameters
Name | Type | Description |
---|---|---|
name |
string | Database name |
Usage
local database_info = database.load('some_database.db');
save
database.save(name: string, data: any)
Saves data to a database file.
Parameters
Name | Type | Description |
---|---|---|
name |
string | Database name |
data |
any | Data to save |
Usage
local database_info =
{
some_value = 5,
some_string = "ev0lve.xyz"
};
database.save('some_database.db', database_info);