View Source Conion.Store (conion v0.1.0)

The API for the store components Conion.Store.Server and Conion.Store.Bucket.

Also see the Behaviour defined in Conion.Store.Persistor

Summary

Functions

returns true if the given bucket is not saved permanently

Get the entry with the given id from the bucket

Insert a new entry into an existing bucket

List all entries from the bucket [{id,entry},...]

List all available buckets

Create or load a new bucket

Create or load a new bucket with a persistor

persist the bucket

Returns the persistor of a bucket

remove entry with the given id

Update replace the entry at the given id with the new entry

Sorts the list of buckets [{id,entry}, {id, entry}, ...] by the given function

Functions

dirty?(bucket)

returns true if the given bucket is not saved permanently

get(bucket, id)

Get the entry with the given id from the bucket

insert_new(bucket, entry)

Insert a new entry into an existing bucket

list(bucket)

List all entries from the bucket [{id,entry},...]

list_buckets()

List all available buckets

new_bucket(name)

Create or load a new bucket

new_bucket(name, persistor, args)

Create or load a new bucket with a persistor

persist(bucket)

persist the bucket

persistor(bucket)

Returns the persistor of a bucket

remove(bucket, id)

remove entry with the given id

replace(bucket, id, new_entry)

Update replace the entry at the given id with the new entry

sort_by(list, func)

Sorts the list of buckets [{id,entry}, {id, entry}, ...] by the given function