Esempio n. 1
0
        internal static void Del(IntPtr txn, uint dbi, DbValue key, IntPtr value)
        {
            int err = _delDelegate(txn, dbi, ref key, value);

            if (err != 0)
            {
                throw new MdbxException("mdbx_del", err);
            }
        }
Esempio n. 2
0
        internal static void Put(IntPtr cursor, ref DbValue key, ref DbValue value, CursorPutOption option)
        {
            int err = _putDelegate(cursor, ref key, ref value, option);

            if (err != 0)
            {
                throw new MdbxException("mdbx_cursor_put", err);
            }
        }
Esempio n. 3
0
        internal static void Put(IntPtr txn, uint dbi, DbValue key, DbValue value, PutOption options)
        {
            int err = _putDelegate(txn, dbi, ref key, ref value, (uint)options);

            if (err != 0)
            {
                throw new MdbxException("mdbx_put", err);
            }
        }
Esempio n. 4
0
        internal static void Get(IntPtr cursor, ref DbValue key, ref DbValue value, CursorOp op)
        {
            int err = _getDelegate(cursor, ref key, ref value, op);

            if (err != 0)
            {
                throw new MdbxException("mdbx_cursor_get", err);
            }
        }
Esempio n. 5
0
        internal static DbValue Get(IntPtr txn, uint dbi, DbValue key)
        {
            DbValue value = new DbValue();
            int     err   = _getDelegate(txn, dbi, ref key, ref value);

            if (err != 0)
            {
                throw new MdbxException("mdbx_get", err);
            }
            return(value);
        }