INTRO
This module is used to manage different KV backends to your cloud of Erlang apps. This is an unified abstraction layer to several databases: redis, mongo, mnesia, riak, aerospike.
You can change backend by setting application env. This behaves well on
application:set_env(kvs,dba,store_mnesia).
RECORDS
#ok { data= [] :: term() }.
#error { data= [] :: term() }.
#cur { id= [] :: term(),
top= [] :: [] | integer(),
bot= [] :: [] | integer(),
dir= 0 :: 0 | 1,
reader= [] :: [] | tuple(),
writer= [] :: [] | tuple(),
left= 0 :: integer(),
right= 0 :: inetegr() }.
#iter { id= [] :: [] | integer(),
prev= [] :: [] | integer(),
next= [] :: [] | integer()).
- id — Unique key of the cursor.
CONFIG
In sys.config you should specify kvs backend and list of modules containing metainfo/0 exported function.
[{kvs, [{dba, store_mnesia},
{schema, [kvs]} ]}].
This module may refer to: mnesia, kvs_stream.