Skip to content

database

Methods

load(key): number/bool/string/table

Type Name Description Default
string key Key to get value of none

Returns previously saved data from persistent storage or returns nil on error

1
2
3
4
local num = database.load('num')    -- 1337
local bool = database.load('bool')  -- true
local str = database.load('str')    -- "Hello"
local tbl = database.load('tbl')    -- { "What's up", 420, false }

save(key, value)

Type Name Description Default
string key Key to set value to none
number/bool/string/table value Value to save none

Saves sanitizable data to a persistent storage

1
2
3
4
database.save('num', 1337)
database.save('bool', true)
database.save('str', 'Hello')
database.save('tbl', { "What's up", 420, false })