Copyright © 2016 Zuse Institute Berlin,
Behaviours: db_backend_beh.
Authors: Thorsten Schuett (schuett@zib.de).
./configure --enable-bitcask=/home/scalaris/apps/bitcask/
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/Users/scalaris/apps/bitcask/priv/
resp.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/scalaris/apps/bitcask/priv/
db() = {DB :: reference(), DBName :: nonempty_string()}
entry() = db_backend_beh:entry()
key() = db_backend_beh:key()
'$end_of_table' is not allowed as key() or else iterations won't work!
close/1 | Closes the DB named DBName. |
close_and_delete/1 | Closes and deletes the DB named DBName. |
delete/2 | Deletes the tuple saved under Key and returns the new DB. |
foldl/3 | Equivalent to toke_drv:fold(Fun, Acc0, DB). |
foldl/4 | Returns a potentially larger-than-memory dataset. |
foldl/5 | foldl iterates over DB and applies Fun(Entry, AccIn) to every element encountered in Interval. |
foldl_unordered/3 | Works similar to foldl/3 but uses toke_drv:fold instead of our own implementation. |
foldr/3 | makes a foldr over the whole dataset. |
foldr/4 | Returns a potentially larger-than-memory dataset. |
foldr/5 | foldr iterates over DB and applies Fun(Entry, AccIn) to every element encountered in Interval. |
get/2 | Returns the entry that corresponds to Key or {} if no such tuple exists. |
get_load/1 | Returns the current load (i.e. |
get_name/1 | Returns the name of the DB specified in @see new/1. |
get_persisted_tables/0 | Gets a list of persisted tables. |
is_available/0 | Checks for modules required for this DB backend. |
new/1 | Creates new DB handle named DBName. |
open/1 | Open a previously existing database. |
put/2 | Saves arbitrary tuple Entry in DB DBName and returns the new DB. |
supports_feature/1 | Returns true if the DB support a specific feature (e.g. |
tab2list/1 | Returns a list of all objects in the table Table_name. |
new(DBName :: nonempty_string()) -> db()
Creates new DB handle named DBName.
open(DBName :: nonempty_string()) -> db()
Open a previously existing database.
close(X1 :: db()) -> true
Closes the DB named DBName
close_and_delete(State :: db()) -> true
Closes and deletes the DB named DBName
get_persisted_tables() -> [nonempty_string()]
Gets a list of persisted tables.
Saves arbitrary tuple Entry in DB DBName and returns the new DB. The key is expected to be the first element of Entry.
Returns the entry that corresponds to Key or {} if no such tuple exists.
Deletes the tuple saved under Key and returns the new DB. If such a tuple does not exists nothing is changed.
get_name(DB :: db()) -> nonempty_string()
Returns the name of the DB specified in @see new/1.
is_available() -> boolean() | [atom()]
Checks for modules required for this DB backend. Returns true if no modules are missing, or else a list of missing modules
supports_feature(Feature :: atom()) -> boolean()
Returns true if the DB support a specific feature (e.g. recovery), false otherwise.
get_load(DB :: db()) -> non_neg_integer()
Returns the current load (i.e. number of stored tuples) of the DB.
Equivalent to toke_drv:fold(Fun, Acc0, DB). Returns a potentially larger-than-memory dataset. Use with care.
foldl(DB :: db(), Fun :: fun((Key :: key(), AccIn :: A) -> AccOut :: A), Acc0 :: A, Interval :: db_backend_beh:interval()) -> Acc1 :: A
Equivalent to foldl(DB, Fun, Acc0, Interval, get_load(DB)).
Returns a potentially larger-than-memory dataset. Use with care.
foldl(DB :: db(), Fun :: fun((Key :: key(), AccIn :: A) -> AccOut :: A), Acc0 :: A, Intervall :: db_backend_beh:interval(), MaxNum :: non_neg_integer()) -> Acc1 :: A
foldl iterates over DB and applies Fun(Entry, AccIn) to every element encountered in Interval. On the first call AccIn == Acc0. The iteration stops as soon as MaxNum elements have been encountered. Returns a potentially larger-than-memory dataset. Use with care.
makes a foldr over the whole dataset. Returns a potentially larger-than-memory dataset. Use with care.
foldr(DB :: db(), Fun :: fun((Key :: key(), AccIn :: A) -> AccOut :: A), Acc0 :: A, Interval :: db_backend_beh:interval()) -> Acc1 :: A
Equivalent to foldr(DB, Fun, Acc0, Interval, get_load(DB)).
Returns a potentially larger-than-memory dataset. Use with care.
foldr(DB :: db(), Fun :: fun((Key :: key(), AccIn :: A) -> AccOut :: A), Acc0 :: A, Intervall :: db_backend_beh:interval(), MaxNum :: non_neg_integer()) -> Acc1 :: A
foldr iterates over DB and applies Fun(Entry, AccIn) to every element encountered in Interval. On the first call AccIn == Acc0. The iteration stops as soon as MaxNum elements have been encountered. Returns a potentially larger-than-memory dataset. Use with care.
foldl_unordered(DB :: db(), Fun :: fun((Entry :: entry(), AccIn :: A) -> AccOut :: A), Acc0 :: A) -> Acc1 :: A
Works similar to foldl/3 but uses toke_drv:fold instead of our own implementation. The order in which will be iterated over is unspecified, but using this fuction might be faster than foldl/3 if it does not matter.
Returns a list of all objects in the table Table_name.
Generated by EDoc, Aug 2 2016, 13:42:11.