/// <inheritdoc /> public Task <Slice> GetAsync(ReadOnlySpan <byte> key) { EnsureCanRead(); FdbKey.EnsureKeyIsValid(key); #if DEBUG if (Logging.On && Logging.IsVerbose) { Logging.Verbose(this, "GetAsync", $"Getting value for '{key.ToString()}'"); } #endif return(m_parent.PerformGetOperation(key, snapshot: true)); }
/// <inheritdoc /> public Task <(FdbValueCheckResult Result, Slice Actual)> CheckValueAsync(ReadOnlySpan <byte> key, Slice expected) { EnsureCanRead(); FdbKey.EnsureKeyIsValid(key); #if DEBUG if (Logging.On && Logging.IsVerbose) { Logging.Verbose(this, "ValueCheckAsync", $"Checking the value for '{key.ToString()}'"); } #endif return(m_parent.PerformValueCheckOperation(key, expected, snapshot: true)); }
public Task <Slice> GetKeyAsync(KeySelector selector) { EnsureCanRead(); FdbKey.EnsureKeyIsValid(selector.Key); #if DEBUG if (Logging.On && Logging.IsVerbose) { Logging.Verbose(this, "GetKeyAsync", $"Getting key '{selector.ToString()}'"); } #endif return(m_parent.PerformGetKeyOperation(selector, snapshot: true)); }
public Task <Slice[]> GetKeysAsync(KeySelector[] selectors) { EnsureCanRead(); for (int i = 0; i < selectors.Length; i++) { FdbKey.EnsureKeyIsValid(selectors[i].Key); } #if DEBUG if (Logging.On && Logging.IsVerbose) { Logging.Verbose(this, "GetKeysCoreAsync", $"Getting batch of {selectors.Length} keys ..."); } #endif return(m_parent.PerformGetKeysOperation(selectors, snapshot: true)); }
/// <inheritdoc /> public Task <FdbRangeChunk> GetRangeAsync(KeySelector beginInclusive, KeySelector endExclusive, int limit = 0, bool reverse = false, int targetBytes = 0, FdbStreamingMode mode = FdbStreamingMode.Exact, FdbReadMode read = FdbReadMode.Both, int iteration = 0) { EnsureCanRead(); FdbKey.EnsureKeyIsValid(beginInclusive.Key); FdbKey.EnsureKeyIsValid(endExclusive.Key, endExclusive: true); FdbRangeOptions.EnsureLegalValues(limit, targetBytes, mode, read, iteration); // The iteration value is only needed when in iterator mode, but then it should start from 1 if (iteration == 0) { iteration = 1; } return(m_parent.PerformGetRangeOperation(beginInclusive, endExclusive, snapshot: true, limit, reverse, targetBytes, mode, read, iteration)); }