store Module
delete
dict:datastore 'sym ⇒ dict:datastore
Removes an item from the datastore dict:datastore. The item is uniquely identified by 'sym, which contains the collection containing the item and the item id, separated by a forward slash (/). Puts the reference to the modified datastore back on tbe stack.
get
dict:datastore 'sym ⇒ dict
Retrieves item dict from datastore dict:datastore. dict is retrieved by specifying 'sym, which contains the collection containing the item and the item id, separated by a forward slash (/).
has?
dict:datastore 'sym ⇒ bool
Returns true if dict:datastore has a key called 'sym (which contains the collection containing the item and the item id), false otherwise.
init
'sym ⇒ dict:datastore
Initializes a bew datastore by creating the 'sym JSON file. Puts the datastore instance on the stack.
post
dict:datastore 'sym dict ⇒ dict:datastore
Adds the dictionary dict to the datastore dict:datastore inside collection 'sym, generating and adding a unique id field to dict. If the collection 'sym does not exist it is created. Puts the reference to the modified datastore back on tbe stack.
put
dict:datastore 'sym dict ⇒ dict:datastore
Adds the dictionary dict to the datastore dict:datastore. 'sym contains the collection where dict will be placed and the id of dict, separated by a forward slash (/). If the collection 'sym does not exist it is created. Puts the reference to the modified datastore back on tbe stack.
query
dict:datastore 'sym quot ⇒ (dict*)
Retrieves a quotation of dictionaries from the collection 'sym of datastore dict:datastore obtained by applying quot as a filter to each item of the collection, picking only the elements that match the filter.
read
'sym ⇒ dict:datastore
Reads the previously-created datastore from the file 'sym and puts the resulting datastore instance on the stack.
write
dict:datastore ⇒ dict:datastore
Writes the contents of the datastore dict:datastore to the filesystem.