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