예제 #1
0
        public static int mdb_put(IntPtr txn, uint dbi, ArraySegment <byte> key, ArraySegment <byte> value, PutOptions flags)
        {
            fixed(byte *pKey = key.Array)
            fixed(byte *pValue = value.Array)
            {
                var k = new mdb_val(key.Count, pKey + key.Offset);
                var v = new mdb_val(value.Count, pValue + value.Offset);

                return(check(LmdbMethods.mdb_put(txn, dbi, ref k, ref v, flags)));
            }
        }
예제 #2
0
 public static extern int mdb_put(IntPtr txn, uint dbi, ref mdb_val key, ref mdb_val data, PutOptions flags);