/// <summary> /// Set the database entry for "key" to "value". /// Note: consider setting new WriteOptions{ Sync = true }. /// </summary> public void Put(byte[] key, byte[] value, WriteOptions options) { IntPtr error; LevelDbInterop.leveldb_put(Handle, options.Handle, key, (IntPtr)key.LongLength, value, (IntPtr)value.LongLength, out error); Throw(error); }
/// <summary> /// Set the database entry for "key" to "value". /// Note: consider setting new WriteOptions{ Sync = true }. /// </summary> public void Put(int key, int[] value, WriteOptions options) { IntPtr error; LevelDbInterop.leveldb_put(Handle, options.Handle, ref key, (IntPtr)sizeof(int), value, checked ((IntPtr)(value.LongLength * 4)), out error); Throw(error); }