Struct MergeOperands
- Namespace
- RocksDbNet
- Assembly
- RocksDb.Net.dll
The operands of a merge, read in place from RocksDb's memory.
public readonly ref struct MergeOperands
- Inherited Members
Remarks
A ref struct because the memory it reads belongs to the
merge in progress: RocksDb builds the operand arrays as locals of the call
and they are gone when it returns. The compiler therefore stops it being
stored in a field, captured, or kept past the callback, which is the
mistake the copying overloads exist to make safe. Copy an operand with
ToArray() if it has to outlive the call.
Operands are in chronological order, oldest first.
Properties
Count
The number of operands.
public int Count { get; }
Property Value
this[int]
The operand at index, valid for the duration of the callback.
public ReadOnlySpan<byte> this[int index] { get; }
Parameters
indexint
Property Value
Exceptions
- ArgumentOutOfRangeException
indexis out of range.
Methods
ToArrays()
Copies every operand into a managed array.
public byte[][] ToArrays()
Returns
- byte[][]