#include "../rocksdb/db/c.cc" #include "c.h" extern "C" { rocksdb_pinnableslice_t* rocksdb_transactiondb_get_pinned_cf( rocksdb_transactiondb_t* db, const rocksdb_readoptions_t* options, rocksdb_column_family_handle_t* column_family, const char* key, size_t keylen, char** errptr) { rocksdb_pinnableslice_t* v = new (rocksdb_pinnableslice_t); Status s = db->rep->Get(options->rep, column_family->rep, Slice(key, keylen), &v->rep); if (!s.ok()) { delete v; if (!s.IsNotFound()) { SaveError(errptr, s); } return nullptr; } return v; } void rocksdb_transactiondb_flush( rocksdb_transactiondb_t* db, const rocksdb_flushoptions_t* options, char** errptr) { SaveError(errptr, db->rep->Flush(options->rep)); } rocksdb_writeoptions_t* rocksdb_writeoptions_create_copy(rocksdb_writeoptions_t* options) { return new rocksdb_writeoptions_t(*options); } }