Skip to content

Latest commit

 

History

History
140 lines (67 loc) · 3.5 KB

cowdb_util.md

File metadata and controls

140 lines (67 loc) · 3.5 KB

Module cowdb_util

Function Index

apply/2
commit_transaction/2commit the transaction on the disk.
delete_file/1delete a file safely.
delete_file/2
delete_property/2
get_opt/2
get_opt/3
get_value/2
get_value/3
init_db/6initialize the db.
maybe_sync/3test if the db file should be synchronized or not depending on the state.
reorder_results/2
set_property/3
shutdown_sync/1synchronous shutdown.
timestamp/0
uniqid/0
write_header/2write the db header.

Function Details

apply/2

apply(Func, Args) -> any()

commit_transaction/2

commit_transaction(TransactId, Db) -> any()

commit the transaction on the disk.

delete_file/1

delete_file(FilePath) -> any()

delete a file safely

delete_file/2

delete_file(FilePath, Async) -> any()

delete_property/2

delete_property(Key, Props) -> any()

get_opt/2

get_opt(Key, Opts) -> any()

get_opt/3

get_opt(Key, Opts, Default) -> any()

get_value/2

get_value(Key, List) -> any()

get_value/3

get_value(Key, List, Default) -> any()

init_db/6

init_db(Header, DbPid, Fd, ReaderFd, FilePath, Options) -> any()

initialize the db

maybe_sync/3

maybe_sync(Status, Fd, FSyncOptions) -> any()

test if the db file should be synchronized or not depending on the state

reorder_results/2

reorder_results(Keys, SortedResults) -> any()

set_property/3

set_property(Key, Value, Props) -> any()

shutdown_sync/1

shutdown_sync(Pid) -> any()

synchronous shutdown

timestamp/0

timestamp() -> any()

uniqid/0

uniqid() -> any()

write_header/2

write_header(Header, Db) -> any()

write the db header