public static IntPtr /* leveldb_comparator_t* */ leveldb_comparator_create( IntPtr /* void* */ state, IntPtr /* void (*)(void*) */ destructor, IntPtr /* int (*compare)(void*, * const char* a, size_t alen, * const char* b, size_t blen) */ compare, IntPtr /* const char* (*)(void*) */ name) { return(NativeRocksDB.rocksdb_comparator_create(state, destructor, compare, name)); }
public static void leveldb_options_set_paranoid_checks(IntPtr /*Options*/ options, [MarshalAs(UnmanagedType.U1)] bool o) { NativeRocksDB.rocksdb_options_set_paranoid_checks(options, o); }
public static void leveldb_destroy_db(IntPtr /* Options*/ options, string name, out IntPtr error) { NativeRocksDB.rocksdb_destroy_db(options, name, out error); }
public static void leveldb_release_snapshot(IntPtr /* DB */ db, IntPtr /* SnapShot*/ snapshot) { NativeRocksDB.rocksdb_release_snapshot(db, snapshot); }
//[DllImport("libleveldb", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] //static extern void leveldb_approximate_sizes(IntPtr /* DB */ db, int num_ranges, byte[] range_start_key, long range_start_key_len, byte[] range_limit_key, long range_limit_key_len, out long sizes); public static IntPtr leveldb_create_iterator(IntPtr /* DB */ db, IntPtr /* ReadOption */ options) { return(NativeRocksDB.rocksdb_create_iterator(db, options)); }
public static void leveldb_write(IntPtr /* DB */ db, IntPtr /* WriteOptions*/ options, IntPtr /* WriteBatch */ batch, out IntPtr errptr) { NativeRocksDB.rocksdb_write(db, options, batch, out errptr); }
public static void leveldb_comparator_destroy(IntPtr /* leveldb_comparator_t* */ cmp) { NativeRocksDB.rocksdb_comparator_destroy(cmp); }
public static IntPtr leveldb_cache_create_lru(int capacity) { return(NativeRocksDB.rocksdb_cache_create_lru(capacity)); }
public static void leveldb_readoptions_set_fill_cache(IntPtr /*ReadOptions*/ options, [MarshalAs(UnmanagedType.U1)] bool o) { NativeRocksDB.rocksdb_readoptions_set_fill_cache(options, o); }
public static void leveldb_readoptions_destroy(IntPtr /*ReadOptions*/ options) { NativeRocksDB.rocksdb_readoptions_destroy(options); }
//#region Logger //public static IntPtr leveldb_logger_create(IntPtr /* Action<string> */ logger) { // return NativeRocksDB.rocksdb_logger_create(logger); //} //public static void leveldb_logger_destroy(IntPtr /* logger*/ option) { // NativeRocksDB.rocksdb_logger_destroy(option); //} //#endregion #region DB public static IntPtr leveldb_open(IntPtr /* Options*/ options, string name, out IntPtr error) { return(NativeRocksDB.rocksdb_open(options, name, out error)); }
public static void leveldb_options_set_comparator(IntPtr /*Options*/ options, IntPtr /*Comparator*/ comparer) { NativeRocksDB.rocksdb_options_set_comparator(options, comparer); }
public static void leveldb_options_set_max_open_files(IntPtr /*Options*/ options, int max) { NativeRocksDB.rocksdb_options_set_max_open_files(options, max); }
public static void leveldb_options_set_write_buffer_size(IntPtr /*Options*/ options, UIntPtr size) { NativeRocksDB.rocksdb_options_set_write_buffer_size(options, size); }
public static void leveldb_options_set_env(IntPtr /*Options*/ options, IntPtr /*Env*/ env) { NativeRocksDB.rocksdb_options_set_env(options, env); }
public static void leveldb_writeoptions_destroy(IntPtr /*WriteOptions*/ options) { NativeRocksDB.rocksdb_writeoptions_destroy(options); }
public static void leveldb_writeoptions_set_sync(IntPtr /*WriteOptions*/ options, [MarshalAs(UnmanagedType.U1)] bool o) { NativeRocksDB.rocksdb_writeoptions_set_sync(options, o); }
public static void leveldb_readoptions_set_snapshot(IntPtr /*ReadOptions*/ options, IntPtr /*SnapShot*/ snapshot) { NativeRocksDB.rocksdb_readoptions_set_snapshot(options, snapshot); }
public static void leveldb_cache_destroy(IntPtr /*Cache*/ cache) { NativeRocksDB.rocksdb_cache_destroy(cache); }
public static void leveldb_writebatch_clear(IntPtr /* WriteBatch */ batch) { NativeRocksDB.rocksdb_writebatch_clear(batch); }
public static void leveldb_delete(IntPtr /* DB */ db, IntPtr /* WriteOptions*/ options, byte[] key, UIntPtr keylen, out IntPtr errptr) { NativeRocksDB.rocksdb_delete(db, options, key, keylen, out errptr); }
public static void leveldb_writebatch_put(IntPtr /* WriteBatch */ batch, byte[] key, UIntPtr keylen, byte[] val, UIntPtr vallen) { NativeRocksDB.rocksdb_writebatch_put(batch, key, keylen, val, vallen); }
public static IntPtr leveldb_get(IntPtr /* DB */ db, IntPtr /* ReadOptions*/ options, byte[] key, UIntPtr keylen, out UIntPtr vallen, out IntPtr errptr) { return(NativeRocksDB.rocksdb_get(db, options, key, keylen, out vallen, out errptr)); }
public static void leveldb_writebatch_delete(IntPtr /* WriteBatch */ batch, byte[] key, UIntPtr keylen) { NativeRocksDB.rocksdb_writebatch_delete(batch, key, keylen); }
public static IntPtr leveldb_create_snapshot(IntPtr /* DB */ db) { return(NativeRocksDB.rocksdb_create_snapshot(db)); }
public static void leveldb_close(IntPtr /*DB */ db) { NativeRocksDB.rocksdb_close(db); }
public static IntPtr leveldb_property_value(IntPtr /* DB */ db, string propname) { return(NativeRocksDB.rocksdb_property_value(db, propname)); }
public static void leveldb_writebatch_iterate(IntPtr /* WriteBatch */ batch, object state, Action <object, byte[], int, byte[], int> put, Action <object, byte[], int> deleted) { NativeRocksDB.rocksdb_writebatch_iterate(batch, state, put, deleted); }
public static void leveldb_free(IntPtr /* void */ ptr) { NativeRocksDB.rocksdb_free(ptr); }
public static IntPtr leveldb_writeoptions_create() { return(NativeRocksDB.rocksdb_writeoptions_create()); }