#include <btree.h>struct btree *
btree_open_fd(int fd, uint32_t flags);
struct btree *
btree_open(const char *path, uint32_t flags, mode_t mode);
void
btree_close(struct btree *bt);
struct btree_txn *
btree_txn_begin(struct btree *bt, int rdonly);
int
btree_txn_get(struct btree *bt, struct btree_txn *, struct btval *key, struct btval *data);
int
btree_txn_put(struct btree *bt, struct btree_txn *, struct btval *key, struct btval *data, unsigned flags);
int
btree_txn_del(struct btree *bt, struct btree_txn *, struct btval *key, struct btval *data);
int
btree_txn_commit(struct btree_txn *txn);
void
btree_txn_abort(struct btree_txn *txn);
int
btree_get(struct btree *bt, struct btval *key, struct btval *data);
int
btree_put(struct btree *bt, struct btval *key, struct btval *data, unsigned flags);
int
btree_del(struct btree *bt, struct btval *key, struct btval *data);
struct cursor *
btree_txn_cursor_open(struct btree *bt, struct btree_txn *txn);
struct cursor *
btree_cursor_open(struct btree *bt);
void
btree_cursor_close(struct cursor *cursor);
int
btree_cursor_get(struct cursor *cursor, struct btval *key, struct btval *data, enum cursor_op op);
struct btree_stat *
btree_stat(struct btree *bt);
int
btree_compact(struct btree *bt);
int
btree_revert(struct btree *bt);
int
btree_sync(struct btree *bt);
void
btree_set_cache_size(struct btree *bt, unsigned int cache_size);
unsigned int
btree_get_flags(struct btree *bt);
const char *
btree_get_path(struct btree *bt);
int
btree_cmp(struct btree *bt, const struct btval *a, const struct btval *b);
void
btval_reset(struct btval *btv);