Exemplo n.º 1
0
 public void Put(WriteOptions options, byte[] key, byte[] value)
 {
     Native.leveldb_put(handle, options.handle, key, (UIntPtr)key.Length, value, (UIntPtr)value.Length, out IntPtr error);
     NativeHelper.CheckError(error);
 }
Exemplo n.º 2
0
 public void Delete(WriteOptions options, byte[] key)
 {
     Native.leveldb_delete(handle, options.handle, key, (UIntPtr)key.Length, out IntPtr error);
     NativeHelper.CheckError(error);
 }
Exemplo n.º 3
0
 public void Write(WriteOptions options, WriteBatch write_batch)
 {
     Native.leveldb_write(handle, options.handle, write_batch.handle, out IntPtr error);
     NativeHelper.CheckError(error);
 }
Exemplo n.º 4
0
 private void CheckError()
 {
     Native.leveldb_iter_get_error(handle, out IntPtr error);
     NativeHelper.CheckError(error);
 }
Exemplo n.º 5
0
 public static void Repair(string name, Options options)
 {
     Native.leveldb_repair_db(options.handle, Path.GetFullPath(name), out IntPtr error);
     NativeHelper.CheckError(error);
 }