Exemple #1
0
        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));
        }
Exemple #2
0
 public static void leveldb_options_set_paranoid_checks(IntPtr /*Options*/ options, [MarshalAs(UnmanagedType.U1)] bool o)
 {
     NativeRocksDB.rocksdb_options_set_paranoid_checks(options, o);
 }
Exemple #3
0
 public static void leveldb_destroy_db(IntPtr /* Options*/ options, string name, out IntPtr error)
 {
     NativeRocksDB.rocksdb_destroy_db(options, name, out error);
 }
Exemple #4
0
 public static void leveldb_release_snapshot(IntPtr /* DB */ db, IntPtr /* SnapShot*/ snapshot)
 {
     NativeRocksDB.rocksdb_release_snapshot(db, snapshot);
 }
Exemple #5
0
        //[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));
        }
Exemple #6
0
 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);
 }
Exemple #7
0
 public static void leveldb_comparator_destroy(IntPtr /* leveldb_comparator_t* */ cmp)
 {
     NativeRocksDB.rocksdb_comparator_destroy(cmp);
 }
Exemple #8
0
 public static IntPtr leveldb_cache_create_lru(int capacity)
 {
     return(NativeRocksDB.rocksdb_cache_create_lru(capacity));
 }
Exemple #9
0
 public static void leveldb_readoptions_set_fill_cache(IntPtr /*ReadOptions*/ options, [MarshalAs(UnmanagedType.U1)] bool o)
 {
     NativeRocksDB.rocksdb_readoptions_set_fill_cache(options, o);
 }
Exemple #10
0
 public static void leveldb_readoptions_destroy(IntPtr /*ReadOptions*/ options)
 {
     NativeRocksDB.rocksdb_readoptions_destroy(options);
 }
Exemple #11
0
        //#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));
        }
Exemple #12
0
 public static void leveldb_options_set_comparator(IntPtr /*Options*/ options, IntPtr /*Comparator*/ comparer)
 {
     NativeRocksDB.rocksdb_options_set_comparator(options, comparer);
 }
Exemple #13
0
 public static void leveldb_options_set_max_open_files(IntPtr /*Options*/ options, int max)
 {
     NativeRocksDB.rocksdb_options_set_max_open_files(options, max);
 }
Exemple #14
0
 public static void leveldb_options_set_write_buffer_size(IntPtr /*Options*/ options, UIntPtr size)
 {
     NativeRocksDB.rocksdb_options_set_write_buffer_size(options, size);
 }
Exemple #15
0
 public static void leveldb_options_set_env(IntPtr /*Options*/ options, IntPtr /*Env*/ env)
 {
     NativeRocksDB.rocksdb_options_set_env(options, env);
 }
Exemple #16
0
 public static void leveldb_writeoptions_destroy(IntPtr /*WriteOptions*/ options)
 {
     NativeRocksDB.rocksdb_writeoptions_destroy(options);
 }
Exemple #17
0
 public static void leveldb_writeoptions_set_sync(IntPtr /*WriteOptions*/ options, [MarshalAs(UnmanagedType.U1)] bool o)
 {
     NativeRocksDB.rocksdb_writeoptions_set_sync(options, o);
 }
Exemple #18
0
 public static void leveldb_readoptions_set_snapshot(IntPtr /*ReadOptions*/ options, IntPtr /*SnapShot*/ snapshot)
 {
     NativeRocksDB.rocksdb_readoptions_set_snapshot(options, snapshot);
 }
Exemple #19
0
 public static void leveldb_cache_destroy(IntPtr /*Cache*/ cache)
 {
     NativeRocksDB.rocksdb_cache_destroy(cache);
 }
Exemple #20
0
 public static void leveldb_writebatch_clear(IntPtr /* WriteBatch */ batch)
 {
     NativeRocksDB.rocksdb_writebatch_clear(batch);
 }
Exemple #21
0
 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);
 }
Exemple #22
0
 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);
 }
Exemple #23
0
 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));
 }
Exemple #24
0
 public static void leveldb_writebatch_delete(IntPtr /* WriteBatch */ batch, byte[] key, UIntPtr keylen)
 {
     NativeRocksDB.rocksdb_writebatch_delete(batch, key, keylen);
 }
Exemple #25
0
 public static IntPtr leveldb_create_snapshot(IntPtr /* DB */ db)
 {
     return(NativeRocksDB.rocksdb_create_snapshot(db));
 }
Exemple #26
0
 public static void leveldb_close(IntPtr /*DB */ db)
 {
     NativeRocksDB.rocksdb_close(db);
 }
Exemple #27
0
 public static IntPtr leveldb_property_value(IntPtr /* DB */ db, string propname)
 {
     return(NativeRocksDB.rocksdb_property_value(db, propname));
 }
Exemple #28
0
 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);
 }
Exemple #29
0
 public static void leveldb_free(IntPtr /* void */ ptr)
 {
     NativeRocksDB.rocksdb_free(ptr);
 }
Exemple #30
0
 public static IntPtr leveldb_writeoptions_create()
 {
     return(NativeRocksDB.rocksdb_writeoptions_create());
 }