int INativeLibraryFacade.mdb_put(IntPtr txn, uint dbi, ref ValueStructure key, ref ValueStructure data, PutOptions flags)
 {
     return FallbackLibraryFacade.mdb_put(txn, dbi, ref key, ref data, flags);
 }
 private static extern int mdb_put(IntPtr txn, UInt32 dbi, ref ValueStructure key, ref ValueStructure data, PutOptions flags);
Example #3
0
 public static extern int mdb_put(IntPtr txn, uint dbi, ref ValueStructure key, ref ValueStructure data, PutOptions flags);
        //TODO: tests
        public void Put(byte[] key, byte[] value, PutOptions options)
        {
            using(var keyMarshalStruct = new MarshalValueStructure(key))
            using (var valueMarshalStruct = new MarshalValueStructure(value))
            {
                var keyStruct = keyMarshalStruct.ValueStructure;
                var valueStruct = valueMarshalStruct.ValueStructure;

                Native.Execute(lib => lib.mdb_cursor_put(_handle, keyStruct, valueStruct, options));
            }
        }
 private static extern int mdb_cursor_put(IntPtr cursor, ValueStructure key, ValueStructure data, PutOptions flags);
 int INativeLibraryFacade.mdb_cursor_put(IntPtr cursor, ValueStructure key, ValueStructure data, PutOptions flags)
 {
     return FallbackLibraryFacade.mdb_cursor_put(cursor, key, data, flags);
 }
Example #7
0
 public static int mdb_put(IntPtr txn, uint dbi, byte[] key, byte[] value, PutOptions flags)
 {
     using(var marshal = new MarshalValueStructure(key, value))
         return check(LmdbMethods.mdb_put(txn, dbi, ref marshal.Key, ref marshal.Value, flags));
 }
        /// <summary>
        /// Put data into a database.
        /// </summary>
        /// <param name="db">Database.</param>
        /// <param name="key">Key byte array.</param>
        /// <param name="value">Value byte array.</param>
        /// <param name="options">Operation options (optional).</param>
        public void Put(LightningDatabase db, byte[] key, byte[] value, PutOptions options = PutOptions.None)
        {
            if (db == null)
                throw new ArgumentNullException(nameof(db));

            mdb_put(_handle, db.Handle(), key, value, options);
        }
	public void CopyTo(ManagementOperationObserver watcher, ManagementPath path, PutOptions options) {}
        public void Put(LightningDatabase db, byte[] key, byte[] value, PutOptions options = PutOptions.None)
        {
            if (db == null)
                throw new ArgumentNullException("db");

            using (var keyStructureMarshal = new MarshalValueStructure(key))
            using (var valueStructureMarshal = new MarshalValueStructure(value))
            {
                var keyStruct = keyStructureMarshal.ValueStructure;
                var valueStruct = valueStructureMarshal.ValueStructure;

                Native.Execute(() => Native.mdb_put(_handle, db._handle, ref keyStruct, ref valueStruct, options));
            }
        }
	public ManagementPath CopyTo(ManagementPath path, PutOptions options) {}
	public ManagementPath CopyTo(string path, PutOptions options) {}
	public void Put(ManagementOperationObserver watcher, PutOptions options) {}
	public ManagementPath Put(PutOptions options) {}
Example #15
0
 int INativeLibraryFacade.mdb_cursor_put(IntPtr cursor, ref ValueStructure key, ref ValueStructure data, PutOptions flags)
 {
     return Native64BitLibraryFacade.mdb_cursor_put(cursor, ref key, ref data, flags);
 }