public static TransactionSetOption ( |
||
transaction | ||
option | FdbTransactionOption | |
value | byte | |
valueLength | int | |
Результат | FdbError |
//TODO: this is redundant with GetApproximateSize which does the exact book-keeping (but is async!). Should we keep it? or get remove it? #endregion #region Options... /// <inheritdoc /> public void SetOption(FdbTransactionOption option, ReadOnlySpan <byte> data) { Fdb.EnsureNotOnNetworkThread(); unsafe { fixed(byte *ptr = data) { Fdb.DieOnError(FdbNative.TransactionSetOption(m_handle, option, ptr, data.Length)); } } }
public void SetOption(FdbTransactionOption option, Slice data) { Fdb.EnsureNotOnNetworkThread(); unsafe { fixed(byte *ptr = data) { Fdb.DieOnError(FdbNative.TransactionSetOption(m_handle, option, ptr, data.Count)); } } }
public void SetOption(FdbTransactionOption option, Slice data) { Fdb.EnsureNotOnNetworkThread(); unsafe { if (data.IsNull) { Fdb.DieOnError(FdbNative.TransactionSetOption(m_handle, option, null, 0)); } else { fixed(byte *ptr = data.Array) { Fdb.DieOnError(FdbNative.TransactionSetOption(m_handle, option, ptr + data.Offset, data.Count)); } } } }