refactor API
this ticket supersede #68 (closed) #61 (closed) #86 (closed) make the API more understandable. We should consider it like the crypto module. Just a simple wrapper over the lib. Another way to provide a maybe better api is to rename some parts of the api, old api will be kept until the next major release but marked as deprecated. The following changes will be made (as described in #86 (closed)) :
#61 (closed))
column familly api (-
drop_column_family/1
replaced bydrop_column_family(DBRef, CfRef}
-
destroy_column_family/1
replaced bydestroy_column_family/(DBRef, CfRef}
cache api
-
new_lru_cache(Capacity)
andnew_clock_cache(Capacity)
replaced bynew_cache(Type, Capacity)
where type can belru
orclock
. -
get_usage/1
,get_pinned_usage/1
andget_capacity
replaced bycache_info(CacheRef)
andcache_info(CacherRef, Item)
where item can beusage
,pinned_usage
,capacity
,strict_capacity
, later could be true or false if capacity is struct.
env api
-
default_env/0
,mem_env/0
replaced bynew_env(Type)
where Type can bedefault
ormem
. withnew_env()
as a shortcut tinew_env(default)
transaction log api
-
updates_iterator/2
replaced bytlog_iterator/2
-
close_updates_iterator/1
replaced bytlog_iterator_close/1
-
next_binary_update/1
replaced bytlog_next_binary_update/1
-
next_update/1
replaced bytlog_next_update/1
I've shorten
transaction_log
intlog
there
backup api
-
close_backup/1
replaced byclose_backup_engine/1
-
garbage_collect_backup/1
replaced bygc_backup_engine/1
removed API
-
count/{1, 2}
:get_property
is enough -
fold/4
,fold/5
,fold_keys/4
,fold_keys/5
for remova: we have iterators -
write/3
for removal: we have batch
Edited by benoît chesneau