Fetch Entire Dictionary (LCC.kvdb.dict.get_all)
Signature
values, err = LCC.kvdb.dict.get_all(name, timeout?)
Parameters
- name
String. Dictionary name (non-empty, max256bytes). - timeout
Number, optional. Request timeout in seconds, default60.
Returns
- values
Table. Mapping{ key = value }; returns an empty table when the dictionary is empty, ornilon failure. - err
String ornil. Error description when the call fails.
Notes
Returns a full snapshot of the dictionary as a key/value table.
An empty dictionary returns an empty table, notnil.
Example
local dict, err = LCC.kvdb.dict.get_all("settings")
if dict then
for k, v in pairs(dict) do
print(k, v)
end
end