leo_backend_db_eleveldb¶
Handling database operation for eleveldb.
References
Description¶
Handling database operation for eleveldb
Function Index¶
close/1 | Close a leveldb data store and flush any pending writes to disk. |
delete/2 | Delete an object from the eleveldb. |
first/1 | Retrieve a first record from eleveldb. |
get/2 | Retrieve an object from the eleveldb. |
open/1 | Open a new or existing leveldb datastore for read-only access. |
open/2 | |
prefix_search/4 | Retrieve objects from eleveldb by a keyword. |
put/3 | Insert an object into the eleveldb. |
status/1 | Get the status information for this eleveldb backend. |
Function Details¶
close/1¶
close(Handler) -> ok
- Handler = binary()
Close a leveldb data store and flush any pending writes to disk
delete/2¶
delete(Handler, Key) -> ok | {error, any()}
- Handler = binary()
- Key = binary()
Delete an object from the eleveldb.
first/1¶
first(Handler) -> {ok, any()} | not_found | {error, any()}
- Handler = binary()
Retrieve a first record from eleveldb.
get/2¶
get(Handler, Key) -> {ok, binary()} | not_found | {error, any()}
- Handler = binary()
- Key = binary()
Retrieve an object from the eleveldb.
open/1¶
open(Path) -> {error, any()} | {ok, pid()}
- Path = string()
Open a new or existing leveldb datastore for read-only access
prefix_search/4¶
prefix_search(Handler, Key, Fun, MaxKeys) -> {ok, [term()]} | not_found | {error, any()}
- Handler = binary()
- Key = binary()
- Fun = function()
- MaxKeys = integer()
Retrieve objects from eleveldb by a keyword.
put/3¶
put(Handler, Key, Value) -> ok | {error, any()}
- Handler = binary()
- Key = binary()
- Value = binary()
Insert an object into the eleveldb.
status/1¶
status(Handler) -> [{atom(), term()}]
- Handler = binary()
Get the status information for this eleveldb backend