Values returned from the database are valid only until a subsequent update operation, or the end of the transaction. Do not modify or free them, they commonly point into the database itself.
Key sizes must be between 1 and env_get_maxkeysize inclusive. The same applies to data sizes in databases with the DUPSORT flag.
Other data items can in theory be from 0 to 0xffffffff bytes long.
struct MDB_val {
size_t mv_size;
void * mv_data;
}
| Modifier and Type | Class and Description |
|---|---|
| public static class | MDBVal.
An array of |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ALIGNOF
The struct alignment in bytes. |
| public static final int | MV_DATA
The struct member offsets. |
| public static final int | MV_SIZE
The struct member offsets. |
| public static final int | SIZEOF
The struct size in bytes. |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | MDBVal(ByteBuffer container)
Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public static MDBVal | |
| public static MDBVal. | calloc(int
the buffer capacity capacity)Returns a new |
| public static MDBVal | calloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static MDBVal. | calloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public static MDBVal | |
| public static MDBVal | |
| public static MDBVal. | |
| public static MDBVal. | |
| protected MDBVal | create(long
the struct memory address address, ByteBuffer an optional container buffer, to be referenced strongly by the struct instance. container)Implements abstract org. the constructor, but returns the exact type of the Struct subclass.
|
| public static MDBVal | |
| public static MDBVal | |
| public static MDBVal. | create(int
the buffer capacity capacity)Returns a new |
| public static MDBVal. | create(long
the memory address address, int the buffer capacity capacity)Create a |
| public static MDBVal | |
| public static MDBVal. | |
| public static MDBVal | |
| public static MDBVal. | malloc(int
the buffer capacity capacity)Returns a new |
| public static MDBVal | malloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static MDBVal. | malloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public static MDBVal | |
| public static MDBVal | |
| public static MDBVal. | |
| public static MDBVal. | |
| public ByteBuffer | |
| public MDBVal | |
| public long | |
| public MDBVal | |
| public static ByteBuffer | |
| public static void | |
| public static long | |
| public static void | nmv_size(long struct, long value)
Sets the specified value to the |
| public MDBVal | |
| public MDBVal | |
| public int |
| ALIGNOF | back to summary |
|---|---|
| public static final int ALIGNOF The struct alignment in bytes. | |
| MV_DATA | back to summary |
|---|---|
| public static final int MV_DATA The struct member offsets. | |
| MV_SIZE | back to summary |
|---|---|
| public static final int MV_SIZE The struct member offsets. | |
| SIZEOF | back to summary |
|---|---|
| public static final int SIZEOF The struct size in bytes. | |
| MDBVal | back to summary |
|---|---|
| protected MDBVal(long address, ByteBuffer container) | |
| MDBVal | back to summary |
|---|---|
| public MDBVal(ByteBuffer container) Creates a The created instance holds a strong reference to the container object. | |
| calloc | back to summary |
|---|---|
| public static MDBVal calloc() Returns a new | |
| calloc | back to summary |
|---|---|
| public static MDBVal. Returns a new
| |
| calloc | back to summary |
|---|---|
| public static MDBVal calloc(MemoryStack stack) Returns a new
| |
| calloc | back to summary |
|---|---|
| public static MDBVal. Returns a new
| |
| callocStack | back to summary |
|---|---|
| public static MDBVal callocStack()
Deprecated
Deprecated for removal in 3.4.0. Use
| |
| callocStack | back to summary |
|---|---|
| public static MDBVal callocStack(MemoryStack stack)
Deprecated
Deprecated for removal in 3.4.0. Use
| |
| callocStack | back to summary |
|---|---|
| public static MDBVal. Deprecated
Deprecated for removal in 3.4.0. Use
| |
| callocStack | back to summary |
|---|---|
| public static MDBVal. Deprecated
Deprecated for removal in 3.4.0. Use
| |
| create | back to summary |
|---|---|
| protected MDBVal create(long address, ByteBuffer container) Implements abstract org. Doc from org. Similar to Effectively, every
| |
| create | back to summary |
|---|---|
| public static MDBVal create() Returns a new | |
| create | back to summary |
|---|---|
| public static MDBVal create(long address) Returns a new | |
| create | back to summary |
|---|---|
| public static MDBVal. Returns a new
| |
| create | back to summary |
|---|---|
| public static MDBVal. Create a
| |
| createSafe | back to summary |
|---|---|
| public static MDBVal createSafe(long address) Like
| |
| createSafe | back to summary |
|---|---|
| public static MDBVal. Like
| |
| malloc | back to summary |
|---|---|
| public static MDBVal malloc() Returns a new | |
| malloc | back to summary |
|---|---|
| public static MDBVal. Returns a new
| |
| malloc | back to summary |
|---|---|
| public static MDBVal malloc(MemoryStack stack) Returns a new
| |
| malloc | back to summary |
|---|---|
| public static MDBVal. Returns a new
| |
| mallocStack | back to summary |
|---|---|
| public static MDBVal mallocStack()
Deprecated
Deprecated for removal in 3.4.0. Use
| |
| mallocStack | back to summary |
|---|---|
| public static MDBVal mallocStack(MemoryStack stack)
Deprecated
Deprecated for removal in 3.4.0. Use
| |
| mallocStack | back to summary |
|---|---|
| public static MDBVal. Deprecated
Deprecated for removal in 3.4.0. Use
| |
| mallocStack | back to summary |
|---|---|
| public static MDBVal. Deprecated
Deprecated for removal in 3.4.0. Use
| |
| mv_data | back to summary |
|---|---|
| public ByteBuffer mv_data() Address of the data item.
| |
| mv_data | back to summary |
|---|---|
| public MDBVal mv_data(ByteBuffer value) Sets the address of the specified | |
| mv_size | back to summary |
|---|---|
| public long mv_size() Size of the data item.
| |
| mv_size | back to summary |
|---|---|
| public MDBVal mv_size(long value) Sets the specified value to the | |
| nmv_data | back to summary |
|---|---|
| public static ByteBuffer nmv_data(long struct) Unsafe version of
| |
| nmv_data | back to summary |
|---|---|
| public static void nmv_data(long struct, ByteBuffer value) Unsafe version of | |
| nmv_size | back to summary |
|---|---|
| public static long nmv_size(long struct) Unsafe version of | |
| nmv_size | back to summary |
|---|---|
| public static void nmv_size(long struct, long value) Sets the specified value to the | |
| set | back to summary |
|---|---|
| public MDBVal set(long mv_size, ByteBuffer mv_data) Initializes this struct with the specified values. | |
| set | back to summary |
|---|---|
| public MDBVal set(MDBVal src) Copies the specified struct data to this struct. | |
| sizeof | back to summary |
|---|---|
| public int sizeof() Implements abstract org. Doc from org. Returns
| |
MDBVal structs.
| Modifier and Type | Field and Description |
|---|---|
| private static final MDBVal |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected MDBVal | |
| public ByteBuffer | |
| public MDBVal. | |
| public long | |
| public MDBVal. | |
| protected MDBVal. |
| ELEMENT_FACTORY | back to summary |
|---|---|
| private static final MDBVal ELEMENT_FACTORY | |
| Buffer | back to summary |
|---|---|
| public Buffer(ByteBuffer container) Creates a new Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values
will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided
by The created buffer instance holds a strong reference to the container object. | |
| Buffer | back to summary |
|---|---|
| public Buffer(long address, int cap) | |
| Buffer | back to summary |
|---|---|
| pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap) | |
| getElementFactory | back to summary |
|---|---|
| protected MDBVal getElementFactory() Implements abstract org.
| |
| mv_data | back to summary |
|---|---|
public ByteBuffer mv_data()
| |
| mv_data | back to summary |
|---|---|
| public MDBVal. Sets the address of the specified | |
| mv_size | back to summary |
|---|---|
public long mv_size()
| |
| mv_size | back to summary |
|---|---|
| public MDBVal. Sets the specified value to the | |
| self | back to summary |
|---|---|
| protected MDBVal. Implements abstract org.
| |