Module leo_backend_db_api

leo_backend_db's API.

References

Description

leo_backend_db's API

Function Index

count/1Count the number of records from backend-db.
delete/2Delete an object from backend-db.
fetch/3Fetch objects from backend-db by key with function.
fetch/4
finish_compaction/2End the data-compaction.
first/1Retrieve a first record from backend-db.
first_n/2Fetch first N records from backend-db.
first_n/3
get/2Retrieve an object from backend-db.
get_db_raw_filepath/1get the database filepath for calculating disk size.
has_instance/1has the instance into the db.
new/4create storage-processes.
new/5
put/3Insert an object into backend-db.
put_value_to_new_db/3Put a record to a new db.
run_compaction/1Start the data-compaction.
status/1Retrieve status from backend-db.
status_compaction/1Retrieve compaction status from backend-db.
stop/1Stop the instance.

Function Details

count/1

count(InstanceName) -> Count

Count the number of records from backend-db.

delete/2

delete(InstanceName, KeyBin) -> ok | {error, any()}

Delete an object from backend-db.

fetch/3

fetch(InstanceName, KeyBin, Fun) -> {ok, list()} | not_found | {error, any()}

Fetch objects from backend-db by key with function.

fetch/4

fetch(InstanceName, KeyBin, Fun, MaxKeys) -> {ok, list()} | not_found | {error, any()}

finish_compaction/2

finish_compaction(InstanceName, Commit) -> ok | {error, any()}

End the data-compaction

first/1

first(InstanceName) -> {ok, list()} | {error, any()}

Retrieve a first record from backend-db.

first_n/2

first_n(InstanceName, N) -> {ok, list()} | not_found | {error, any()}

Fetch first N records from backend-db.

first_n/3

first_n(InstanceName, N, Condition) -> {ok, list()} | not_found | {error, any()}

get/2

get(InstanceName, KeyBin) -> {ok, binary()} | not_found | {error, any()}

Retrieve an object from backend-db.

get_db_raw_filepath/1

get_db_raw_filepath(InstanceName) -> {ok, string()} | {error, any()}

get the database filepath for calculating disk size

has_instance/1

has_instance(InstanceName) -> boolean()

has the instance into the db

new/4

new(InstanceName, NumOfDBProcs, BackendDB, DBRootPath) -> ok | {error, any()}

create storage-processes.

new/5

new(InstanceName, NumOfDBProcs, BackendDB, DBRootPath, IsStrictCheck) -> ok | {error, any()}

put/3

put(InstanceName, KeyBin, ValueBin) -> ok | {error, any()}

Insert an object into backend-db.

put_value_to_new_db/3

put_value_to_new_db(InstanceName, KeyBin, ValueBin) -> ok | {error, any()}

Put a record to a new db

run_compaction/1

run_compaction(InstanceName) -> ok | {error, any()}

Start the data-compaction

status/1

status(InstanceName) -> [{atom(), term()}]

Retrieve status from backend-db.

status_compaction/1

status_compaction(InstanceName) -> [{atom(), term()}]

Retrieve compaction status from backend-db.

stop/1

stop(InstanceName) -> ok | {error, any()}

Stop the instance


Generated by EDoc