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