コード例 #1
0
        public static int mdb_del(IntPtr txn, uint dbi, byte[] key)
        {
            ValueStructure val = default(ValueStructure);

            using (var marshal = new MarshalValueStructure(key)) {
                var code = LmdbMethods.mdb_del(txn, dbi, ref marshal.Key, ref val);
                // not found is not an error
                if (code == 0 || code == MDB_NOTFOUND)
                {
                    return(code);
                }
                // throw exception otherwise
                return(check(code));
            }
        }
コード例 #2
0
 public static int mdb_del(IntPtr txn, uint dbi, byte[] key, byte[] value)
 {
     using (var marshal = new MarshalValueStructure(key, value))
         return(check(LmdbMethods.mdb_del(txn, dbi, ref marshal.Key, ref marshal.Value)));
 }