1 -- Storage Interface API Description
3 -- This is written as a TypedLua description
5 -- Key-Value stores (the default)
8 get : ( self, string? ) -
> (any) | (nil, string)
9 set : ( self, string?, any ) -
> (boolean) | (nil, string)
12 -- Map stores (key-key-value stores)
15 get : ( self, string?, any ) -
> (any) | (nil, string)
16 set : ( self, string?, any, any ) -
> (boolean) | (nil, string)
17 set_keys : ( self, string?, { any : any }) -
> (boolean) | (nil, string)
23 typealias archive_query = {
24 "start" : number?, -- timestamp
25 "end" : number?, -- timestamp
27 "after" : string?, -- archive id
28 "before" : string?, -- archive id
32 interface archive_store
33 -- Optional set of capabilities
35 -- Optional total count of matching items returned as second return value from :find()
40 append : ( self, string?, string?, any, number?, string? ) -
> (string) | (nil, string)
42 -- Iterate over archive
43 find : ( self, string?, archive_query? ) -
> ( () -
> ( string, any, number?, string? ), integer? )
45 -- Removal of items. API like find. Optional?
46 delete : ( self, string?, archive_query? ) -
> (boolean) | (number) | (nil, string)
48 -- Array of dates which do have messages (Optional?)
49 dates : ( self, string? ) -
> ({ string }) | (nil, string)
51 -- Map of counts per
"with" field
52 summary : ( self, string?, archive_query? ) -
> ( { string : integer } ) | (nil, string)
55 -- This represents moduleapi
57 -- If the first string is omitted then the name of the module is used
58 -- The second string is one of
"keyval" (default),
"map" or
"archive"
59 open_store : (self, string?, string?) -
> (keyval_store) | (map_store) | (archive_store) | (nil, string)
61 -- Other module methods omitted