Exemple #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);
            }
        }
Exemple #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);
            }
        }
Exemple #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);
            }
        }
Exemple #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);
            }
        }
Exemple #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);
        }