chore: import upstream snapshot with attribution
CodeQL / Analyze (csharp) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled

This commit is contained in:
wehub-resource-sync
2026-07-13 13:21:23 +08:00
commit b957a53def
5423 changed files with 863745 additions and 0 deletions
@@ -0,0 +1,498 @@
// <auto-generated>
// This code was not auto-generated, we just don't want to get any warnings for it.
// </auto-generated>
// Copyright (c) Microsoft. All rights reserved.
using System.Net;
using StackExchange.Redis;
#nullable enable
namespace Redis.ConformanceTests.Support;
internal class FakeDatabase : IDatabase
{
public FakeDatabase(string settings)
{
}
public int Database => 123;
public IConnectionMultiplexer Multiplexer => throw new NotImplementedException();
public IBatch CreateBatch(object? asyncState = null) => throw new NotImplementedException();
public ITransaction CreateTransaction(object? asyncState = null) => throw new NotImplementedException();
public RedisValue DebugObject(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue> DebugObjectAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisResult Execute(string command, params object[] args) => throw new NotImplementedException();
public RedisResult Execute(string command, ICollection<object> args, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisResult> ExecuteAsync(string command, params object[] args) => throw new NotImplementedException();
public Task<RedisResult> ExecuteAsync(string command, ICollection<object>? args, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool GeoAdd(RedisKey key, double longitude, double latitude, RedisValue member, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool GeoAdd(RedisKey key, GeoEntry value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long GeoAdd(RedisKey key, GeoEntry[] values, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool> GeoAddAsync(RedisKey key, double longitude, double latitude, RedisValue member, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool> GeoAddAsync(RedisKey key, GeoEntry value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> GeoAddAsync(RedisKey key, GeoEntry[] values, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public double? GeoDistance(RedisKey key, RedisValue member1, RedisValue member2, GeoUnit unit = GeoUnit.Meters, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<double?> GeoDistanceAsync(RedisKey key, RedisValue member1, RedisValue member2, GeoUnit unit = GeoUnit.Meters, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public string?[] GeoHash(RedisKey key, RedisValue[] members, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public string? GeoHash(RedisKey key, RedisValue member, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<string?[]> GeoHashAsync(RedisKey key, RedisValue[] members, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<string?> GeoHashAsync(RedisKey key, RedisValue member, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public GeoPosition?[] GeoPosition(RedisKey key, RedisValue[] members, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public GeoPosition? GeoPosition(RedisKey key, RedisValue member, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<GeoPosition?[]> GeoPositionAsync(RedisKey key, RedisValue[] members, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<GeoPosition?> GeoPositionAsync(RedisKey key, RedisValue member, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public GeoRadiusResult[] GeoRadius(RedisKey key, RedisValue member, double radius, GeoUnit unit = GeoUnit.Meters, int count = -1, Order? order = null, GeoRadiusOptions options = GeoRadiusOptions.Default, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public GeoRadiusResult[] GeoRadius(RedisKey key, double longitude, double latitude, double radius, GeoUnit unit = GeoUnit.Meters, int count = -1, Order? order = null, GeoRadiusOptions options = GeoRadiusOptions.Default, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<GeoRadiusResult[]> GeoRadiusAsync(RedisKey key, RedisValue member, double radius, GeoUnit unit = GeoUnit.Meters, int count = -1, Order? order = null, GeoRadiusOptions options = GeoRadiusOptions.Default, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<GeoRadiusResult[]> GeoRadiusAsync(RedisKey key, double longitude, double latitude, double radius, GeoUnit unit = GeoUnit.Meters, int count = -1, Order? order = null, GeoRadiusOptions options = GeoRadiusOptions.Default, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool GeoRemove(RedisKey key, RedisValue member, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool> GeoRemoveAsync(RedisKey key, RedisValue member, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public GeoRadiusResult[] GeoSearch(RedisKey key, RedisValue member, GeoSearchShape shape, int count = -1, bool demandClosest = true, Order? order = null, GeoRadiusOptions options = GeoRadiusOptions.Default, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public GeoRadiusResult[] GeoSearch(RedisKey key, double longitude, double latitude, GeoSearchShape shape, int count = -1, bool demandClosest = true, Order? order = null, GeoRadiusOptions options = GeoRadiusOptions.Default, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long GeoSearchAndStore(RedisKey sourceKey, RedisKey destinationKey, RedisValue member, GeoSearchShape shape, int count = -1, bool demandClosest = true, Order? order = null, bool storeDistances = false, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long GeoSearchAndStore(RedisKey sourceKey, RedisKey destinationKey, double longitude, double latitude, GeoSearchShape shape, int count = -1, bool demandClosest = true, Order? order = null, bool storeDistances = false, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> GeoSearchAndStoreAsync(RedisKey sourceKey, RedisKey destinationKey, RedisValue member, GeoSearchShape shape, int count = -1, bool demandClosest = true, Order? order = null, bool storeDistances = false, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> GeoSearchAndStoreAsync(RedisKey sourceKey, RedisKey destinationKey, double longitude, double latitude, GeoSearchShape shape, int count = -1, bool demandClosest = true, Order? order = null, bool storeDistances = false, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<GeoRadiusResult[]> GeoSearchAsync(RedisKey key, RedisValue member, GeoSearchShape shape, int count = -1, bool demandClosest = true, Order? order = null, GeoRadiusOptions options = GeoRadiusOptions.Default, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<GeoRadiusResult[]> GeoSearchAsync(RedisKey key, double longitude, double latitude, GeoSearchShape shape, int count = -1, bool demandClosest = true, Order? order = null, GeoRadiusOptions options = GeoRadiusOptions.Default, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long HashDecrement(RedisKey key, RedisValue hashField, long value = 1, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public double HashDecrement(RedisKey key, RedisValue hashField, double value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> HashDecrementAsync(RedisKey key, RedisValue hashField, long value = 1, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<double> HashDecrementAsync(RedisKey key, RedisValue hashField, double value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool HashDelete(RedisKey key, RedisValue hashField, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long HashDelete(RedisKey key, RedisValue[] hashFields, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool> HashDeleteAsync(RedisKey key, RedisValue hashField, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> HashDeleteAsync(RedisKey key, RedisValue[] hashFields, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool HashExists(RedisKey key, RedisValue hashField, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool> HashExistsAsync(RedisKey key, RedisValue hashField, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public ExpireResult[] HashFieldExpire(RedisKey key, RedisValue[] hashFields, TimeSpan expiry, ExpireWhen when = ExpireWhen.Always, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public ExpireResult[] HashFieldExpire(RedisKey key, RedisValue[] hashFields, DateTime expiry, ExpireWhen when = ExpireWhen.Always, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<ExpireResult[]> HashFieldExpireAsync(RedisKey key, RedisValue[] hashFields, TimeSpan expiry, ExpireWhen when = ExpireWhen.Always, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<ExpireResult[]> HashFieldExpireAsync(RedisKey key, RedisValue[] hashFields, DateTime expiry, ExpireWhen when = ExpireWhen.Always, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long[] HashFieldGetExpireDateTime(RedisKey key, RedisValue[] hashFields, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long[]> HashFieldGetExpireDateTimeAsync(RedisKey key, RedisValue[] hashFields, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long[] HashFieldGetTimeToLive(RedisKey key, RedisValue[] hashFields, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long[]> HashFieldGetTimeToLiveAsync(RedisKey key, RedisValue[] hashFields, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public PersistResult[] HashFieldPersist(RedisKey key, RedisValue[] hashFields, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<PersistResult[]> HashFieldPersistAsync(RedisKey key, RedisValue[] hashFields, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue HashGet(RedisKey key, RedisValue hashField, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue[] HashGet(RedisKey key, RedisValue[] hashFields, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public HashEntry[] HashGetAll(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<HashEntry[]> HashGetAllAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue> HashGetAsync(RedisKey key, RedisValue hashField, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue[]> HashGetAsync(RedisKey key, RedisValue[] hashFields, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Lease<byte>? HashGetLease(RedisKey key, RedisValue hashField, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<Lease<byte>?> HashGetLeaseAsync(RedisKey key, RedisValue hashField, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long HashIncrement(RedisKey key, RedisValue hashField, long value = 1, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public double HashIncrement(RedisKey key, RedisValue hashField, double value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> HashIncrementAsync(RedisKey key, RedisValue hashField, long value = 1, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<double> HashIncrementAsync(RedisKey key, RedisValue hashField, double value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue[] HashKeys(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue[]> HashKeysAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long HashLength(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> HashLengthAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue HashRandomField(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue> HashRandomFieldAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue[] HashRandomFields(RedisKey key, long count, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue[]> HashRandomFieldsAsync(RedisKey key, long count, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public HashEntry[] HashRandomFieldsWithValues(RedisKey key, long count, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<HashEntry[]> HashRandomFieldsWithValuesAsync(RedisKey key, long count, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public IEnumerable<HashEntry> HashScan(RedisKey key, RedisValue pattern, int pageSize, CommandFlags flags) => throw new NotImplementedException();
public IEnumerable<HashEntry> HashScan(RedisKey key, RedisValue pattern = default, int pageSize = 250, long cursor = 0, int pageOffset = 0, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public IAsyncEnumerable<HashEntry> HashScanAsync(RedisKey key, RedisValue pattern = default, int pageSize = 250, long cursor = 0, int pageOffset = 0, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public IEnumerable<RedisValue> HashScanNoValues(RedisKey key, RedisValue pattern = default, int pageSize = 250, long cursor = 0, int pageOffset = 0, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public IAsyncEnumerable<RedisValue> HashScanNoValuesAsync(RedisKey key, RedisValue pattern = default, int pageSize = 250, long cursor = 0, int pageOffset = 0, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public void HashSet(RedisKey key, HashEntry[] hashFields, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool HashSet(RedisKey key, RedisValue hashField, RedisValue value, When when = When.Always, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task HashSetAsync(RedisKey key, HashEntry[] hashFields, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool> HashSetAsync(RedisKey key, RedisValue hashField, RedisValue value, When when = When.Always, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long HashStringLength(RedisKey key, RedisValue hashField, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> HashStringLengthAsync(RedisKey key, RedisValue hashField, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue[] HashValues(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue[]> HashValuesAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool HyperLogLogAdd(RedisKey key, RedisValue value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool HyperLogLogAdd(RedisKey key, RedisValue[] values, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool> HyperLogLogAddAsync(RedisKey key, RedisValue value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool> HyperLogLogAddAsync(RedisKey key, RedisValue[] values, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long HyperLogLogLength(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long HyperLogLogLength(RedisKey[] keys, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> HyperLogLogLengthAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> HyperLogLogLengthAsync(RedisKey[] keys, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public void HyperLogLogMerge(RedisKey destination, RedisKey first, RedisKey second, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public void HyperLogLogMerge(RedisKey destination, RedisKey[] sourceKeys, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task HyperLogLogMergeAsync(RedisKey destination, RedisKey first, RedisKey second, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task HyperLogLogMergeAsync(RedisKey destination, RedisKey[] sourceKeys, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public EndPoint? IdentifyEndpoint(RedisKey key = default, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<EndPoint?> IdentifyEndpointAsync(RedisKey key = default, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool IsConnected(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool KeyCopy(RedisKey sourceKey, RedisKey destinationKey, int destinationDatabase = -1, bool replace = false, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool> KeyCopyAsync(RedisKey sourceKey, RedisKey destinationKey, int destinationDatabase = -1, bool replace = false, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool KeyDelete(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long KeyDelete(RedisKey[] keys, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool> KeyDeleteAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> KeyDeleteAsync(RedisKey[] keys, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public byte[]? KeyDump(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<byte[]?> KeyDumpAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public string? KeyEncoding(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<string?> KeyEncodingAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException(); public bool KeyExists(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long KeyExists(RedisKey[] keys, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool> KeyExistsAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> KeyExistsAsync(RedisKey[] keys, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool KeyExpire(RedisKey key, TimeSpan? expiry, CommandFlags flags) => throw new NotImplementedException();
public bool KeyExpire(RedisKey key, TimeSpan? expiry, ExpireWhen when = ExpireWhen.Always, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool KeyExpire(RedisKey key, DateTime? expiry, CommandFlags flags) => throw new NotImplementedException();
public bool KeyExpire(RedisKey key, DateTime? expiry, ExpireWhen when = ExpireWhen.Always, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool> KeyExpireAsync(RedisKey key, TimeSpan? expiry, CommandFlags flags) => throw new NotImplementedException();
public Task<bool> KeyExpireAsync(RedisKey key, TimeSpan? expiry, ExpireWhen when = ExpireWhen.Always, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool> KeyExpireAsync(RedisKey key, DateTime? expiry, CommandFlags flags) => throw new NotImplementedException();
public Task<bool> KeyExpireAsync(RedisKey key, DateTime? expiry, ExpireWhen when = ExpireWhen.Always, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public DateTime? KeyExpireTime(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<DateTime?> KeyExpireTimeAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long? KeyFrequency(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long?> KeyFrequencyAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public TimeSpan? KeyIdleTime(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<TimeSpan?> KeyIdleTimeAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public void KeyMigrate(RedisKey key, EndPoint toServer, int toDatabase = 0, int timeoutMilliseconds = 0, MigrateOptions migrateOptions = MigrateOptions.None, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task KeyMigrateAsync(RedisKey key, EndPoint toServer, int toDatabase = 0, int timeoutMilliseconds = 0, MigrateOptions migrateOptions = MigrateOptions.None, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool KeyMove(RedisKey key, int database, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool> KeyMoveAsync(RedisKey key, int database, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool KeyPersist(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool> KeyPersistAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisKey KeyRandom(CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisKey> KeyRandomAsync(CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long? KeyRefCount(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long?> KeyRefCountAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool KeyRename(RedisKey key, RedisKey newKey, When when = When.Always, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool> KeyRenameAsync(RedisKey key, RedisKey newKey, When when = When.Always, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public void KeyRestore(RedisKey key, byte[] value, TimeSpan? expiry = null, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task KeyRestoreAsync(RedisKey key, byte[] value, TimeSpan? expiry = null, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public TimeSpan? KeyTimeToLive(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<TimeSpan?> KeyTimeToLiveAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool KeyTouch(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long KeyTouch(RedisKey[] keys, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool> KeyTouchAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> KeyTouchAsync(RedisKey[] keys, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisType KeyType(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisType> KeyTypeAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue ListGetByIndex(RedisKey key, long index, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue> ListGetByIndexAsync(RedisKey key, long index, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long ListInsertAfter(RedisKey key, RedisValue pivot, RedisValue value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> ListInsertAfterAsync(RedisKey key, RedisValue pivot, RedisValue value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long ListInsertBefore(RedisKey key, RedisValue pivot, RedisValue value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> ListInsertBeforeAsync(RedisKey key, RedisValue pivot, RedisValue value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue ListLeftPop(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue[] ListLeftPop(RedisKey key, long count, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public ListPopResult ListLeftPop(RedisKey[] keys, long count, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue> ListLeftPopAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue[]> ListLeftPopAsync(RedisKey key, long count, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<ListPopResult> ListLeftPopAsync(RedisKey[] keys, long count, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long ListLeftPush(RedisKey key, RedisValue value, When when = When.Always, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long ListLeftPush(RedisKey key, RedisValue[] values, When when = When.Always, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long ListLeftPush(RedisKey key, RedisValue[] values, CommandFlags flags) => throw new NotImplementedException();
public Task<long> ListLeftPushAsync(RedisKey key, RedisValue value, When when = When.Always, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> ListLeftPushAsync(RedisKey key, RedisValue[] values, When when = When.Always, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> ListLeftPushAsync(RedisKey key, RedisValue[] values, CommandFlags flags) => throw new NotImplementedException();
public long ListLength(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> ListLengthAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue ListMove(RedisKey sourceKey, RedisKey destinationKey, ListSide sourceSide, ListSide destinationSide, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue> ListMoveAsync(RedisKey sourceKey, RedisKey destinationKey, ListSide sourceSide, ListSide destinationSide, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long ListPosition(RedisKey key, RedisValue element, long rank = 1, long maxLength = 0, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> ListPositionAsync(RedisKey key, RedisValue element, long rank = 1, long maxLength = 0, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long[] ListPositions(RedisKey key, RedisValue element, long count, long rank = 1, long maxLength = 0, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long[]> ListPositionsAsync(RedisKey key, RedisValue element, long count, long rank = 1, long maxLength = 0, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue[] ListRange(RedisKey key, long start = 0, long stop = -1, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue[]> ListRangeAsync(RedisKey key, long start = 0, long stop = -1, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long ListRemove(RedisKey key, RedisValue value, long count = 0, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> ListRemoveAsync(RedisKey key, RedisValue value, long count = 0, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue ListRightPop(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue[] ListRightPop(RedisKey key, long count, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public ListPopResult ListRightPop(RedisKey[] keys, long count, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue> ListRightPopAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue[]> ListRightPopAsync(RedisKey key, long count, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<ListPopResult> ListRightPopAsync(RedisKey[] keys, long count, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue ListRightPopLeftPush(RedisKey source, RedisKey destination, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue> ListRightPopLeftPushAsync(RedisKey source, RedisKey destination, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long ListRightPush(RedisKey key, RedisValue value, When when = When.Always, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long ListRightPush(RedisKey key, RedisValue[] values, When when = When.Always, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long ListRightPush(RedisKey key, RedisValue[] values, CommandFlags flags) => throw new NotImplementedException();
public Task<long> ListRightPushAsync(RedisKey key, RedisValue value, When when = When.Always, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> ListRightPushAsync(RedisKey key, RedisValue[] values, When when = When.Always, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> ListRightPushAsync(RedisKey key, RedisValue[] values, CommandFlags flags) => throw new NotImplementedException();
public void ListSetByIndex(RedisKey key, long index, RedisValue value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task ListSetByIndexAsync(RedisKey key, long index, RedisValue value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public void ListTrim(RedisKey key, long start, long stop, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task ListTrimAsync(RedisKey key, long start, long stop, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool LockExtend(RedisKey key, RedisValue value, TimeSpan expiry, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool> LockExtendAsync(RedisKey key, RedisValue value, TimeSpan expiry, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue LockQuery(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue> LockQueryAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool LockRelease(RedisKey key, RedisValue value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool> LockReleaseAsync(RedisKey key, RedisValue value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool LockTake(RedisKey key, RedisValue value, TimeSpan expiry, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool> LockTakeAsync(RedisKey key, RedisValue value, TimeSpan expiry, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public TimeSpan Ping(CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<TimeSpan> PingAsync(CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long Publish(RedisChannel channel, RedisValue message, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> PublishAsync(RedisChannel channel, RedisValue message, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisResult ScriptEvaluate(string script, RedisKey[]? keys = null, RedisValue[]? values = null, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisResult ScriptEvaluate(byte[] hash, RedisKey[]? keys = null, RedisValue[]? values = null, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisResult ScriptEvaluate(LuaScript script, object? parameters = null, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisResult ScriptEvaluate(LoadedLuaScript script, object? parameters = null, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisResult> ScriptEvaluateAsync(string script, RedisKey[]? keys = null, RedisValue[]? values = null, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisResult> ScriptEvaluateAsync(byte[] hash, RedisKey[]? keys = null, RedisValue[]? values = null, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisResult> ScriptEvaluateAsync(LuaScript script, object? parameters = null, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisResult> ScriptEvaluateAsync(LoadedLuaScript script, object? parameters = null, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisResult ScriptEvaluateReadOnly(string script, RedisKey[]? keys = null, RedisValue[]? values = null, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisResult ScriptEvaluateReadOnly(byte[] hash, RedisKey[]? keys = null, RedisValue[]? values = null, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisResult> ScriptEvaluateReadOnlyAsync(string script, RedisKey[]? keys = null, RedisValue[]? values = null, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisResult> ScriptEvaluateReadOnlyAsync(byte[] hash, RedisKey[]? keys = null, RedisValue[]? values = null, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool SetAdd(RedisKey key, RedisValue value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long SetAdd(RedisKey key, RedisValue[] values, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool> SetAddAsync(RedisKey key, RedisValue value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> SetAddAsync(RedisKey key, RedisValue[] values, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue[] SetCombine(SetOperation operation, RedisKey first, RedisKey second, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue[] SetCombine(SetOperation operation, RedisKey[] keys, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long SetCombineAndStore(SetOperation operation, RedisKey destination, RedisKey first, RedisKey second, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long SetCombineAndStore(SetOperation operation, RedisKey destination, RedisKey[] keys, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> SetCombineAndStoreAsync(SetOperation operation, RedisKey destination, RedisKey first, RedisKey second, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> SetCombineAndStoreAsync(SetOperation operation, RedisKey destination, RedisKey[] keys, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue[]> SetCombineAsync(SetOperation operation, RedisKey first, RedisKey second, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue[]> SetCombineAsync(SetOperation operation, RedisKey[] keys, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool SetContains(RedisKey key, RedisValue value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool[] SetContains(RedisKey key, RedisValue[] values, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool> SetContainsAsync(RedisKey key, RedisValue value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool[]> SetContainsAsync(RedisKey key, RedisValue[] values, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long SetIntersectionLength(RedisKey[] keys, long limit = 0, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> SetIntersectionLengthAsync(RedisKey[] keys, long limit = 0, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long SetLength(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> SetLengthAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue[] SetMembers(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue[]> SetMembersAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool SetMove(RedisKey source, RedisKey destination, RedisValue value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool> SetMoveAsync(RedisKey source, RedisKey destination, RedisValue value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue SetPop(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue[] SetPop(RedisKey key, long count, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue> SetPopAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue[]> SetPopAsync(RedisKey key, long count, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue SetRandomMember(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue> SetRandomMemberAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue[] SetRandomMembers(RedisKey key, long count, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue[]> SetRandomMembersAsync(RedisKey key, long count, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool SetRemove(RedisKey key, RedisValue value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long SetRemove(RedisKey key, RedisValue[] values, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool> SetRemoveAsync(RedisKey key, RedisValue value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> SetRemoveAsync(RedisKey key, RedisValue[] values, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public IEnumerable<RedisValue> SetScan(RedisKey key, RedisValue pattern, int pageSize, CommandFlags flags) => throw new NotImplementedException();
public IEnumerable<RedisValue> SetScan(RedisKey key, RedisValue pattern = default, int pageSize = 250, long cursor = 0, int pageOffset = 0, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public IAsyncEnumerable<RedisValue> SetScanAsync(RedisKey key, RedisValue pattern = default, int pageSize = 250, long cursor = 0, int pageOffset = 0, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue[] Sort(RedisKey key, long skip = 0, long take = -1, Order order = Order.Ascending, SortType sortType = SortType.Numeric, RedisValue by = default, RedisValue[]? get = null, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long SortAndStore(RedisKey destination, RedisKey key, long skip = 0, long take = -1, Order order = Order.Ascending, SortType sortType = SortType.Numeric, RedisValue by = default, RedisValue[]? get = null, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> SortAndStoreAsync(RedisKey destination, RedisKey key, long skip = 0, long take = -1, Order order = Order.Ascending, SortType sortType = SortType.Numeric, RedisValue by = default, RedisValue[]? get = null, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue[]> SortAsync(RedisKey key, long skip = 0, long take = -1, Order order = Order.Ascending, SortType sortType = SortType.Numeric, RedisValue by = default, RedisValue[]? get = null, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool SortedSetAdd(RedisKey key, RedisValue member, double score, CommandFlags flags) => throw new NotImplementedException();
public bool SortedSetAdd(RedisKey key, RedisValue member, double score, When when, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool SortedSetAdd(RedisKey key, RedisValue member, double score, SortedSetWhen when = SortedSetWhen.Always, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long SortedSetAdd(RedisKey key, SortedSetEntry[] values, CommandFlags flags) => throw new NotImplementedException();
public long SortedSetAdd(RedisKey key, SortedSetEntry[] values, When when, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long SortedSetAdd(RedisKey key, SortedSetEntry[] values, SortedSetWhen when = SortedSetWhen.Always, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool> SortedSetAddAsync(RedisKey key, RedisValue member, double score, CommandFlags flags) => throw new NotImplementedException();
public Task<bool> SortedSetAddAsync(RedisKey key, RedisValue member, double score, When when, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool> SortedSetAddAsync(RedisKey key, RedisValue member, double score, SortedSetWhen when = SortedSetWhen.Always, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> SortedSetAddAsync(RedisKey key, SortedSetEntry[] values, CommandFlags flags) => throw new NotImplementedException();
public Task<long> SortedSetAddAsync(RedisKey key, SortedSetEntry[] values, When when, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> SortedSetAddAsync(RedisKey key, SortedSetEntry[] values, SortedSetWhen when = SortedSetWhen.Always, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue[] SortedSetCombine(SetOperation operation, RedisKey[] keys, double[]? weights = null, Aggregate aggregate = Aggregate.Sum, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long SortedSetCombineAndStore(SetOperation operation, RedisKey destination, RedisKey first, RedisKey second, Aggregate aggregate = Aggregate.Sum, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long SortedSetCombineAndStore(SetOperation operation, RedisKey destination, RedisKey[] keys, double[]? weights = null, Aggregate aggregate = Aggregate.Sum, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> SortedSetCombineAndStoreAsync(SetOperation operation, RedisKey destination, RedisKey first, RedisKey second, Aggregate aggregate = Aggregate.Sum, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> SortedSetCombineAndStoreAsync(SetOperation operation, RedisKey destination, RedisKey[] keys, double[]? weights = null, Aggregate aggregate = Aggregate.Sum, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue[]> SortedSetCombineAsync(SetOperation operation, RedisKey[] keys, double[]? weights = null, Aggregate aggregate = Aggregate.Sum, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public SortedSetEntry[] SortedSetCombineWithScores(SetOperation operation, RedisKey[] keys, double[]? weights = null, Aggregate aggregate = Aggregate.Sum, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<SortedSetEntry[]> SortedSetCombineWithScoresAsync(SetOperation operation, RedisKey[] keys, double[]? weights = null, Aggregate aggregate = Aggregate.Sum, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public double SortedSetDecrement(RedisKey key, RedisValue member, double value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<double> SortedSetDecrementAsync(RedisKey key, RedisValue member, double value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public double SortedSetIncrement(RedisKey key, RedisValue member, double value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<double> SortedSetIncrementAsync(RedisKey key, RedisValue member, double value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long SortedSetIntersectionLength(RedisKey[] keys, long limit = 0, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> SortedSetIntersectionLengthAsync(RedisKey[] keys, long limit = 0, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long SortedSetLength(RedisKey key, double min = double.NegativeInfinity, double max = double.PositiveInfinity, Exclude exclude = Exclude.None, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> SortedSetLengthAsync(RedisKey key, double min = double.NegativeInfinity, double max = double.PositiveInfinity, Exclude exclude = Exclude.None, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long SortedSetLengthByValue(RedisKey key, RedisValue min, RedisValue max, Exclude exclude = Exclude.None, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> SortedSetLengthByValueAsync(RedisKey key, RedisValue min, RedisValue max, Exclude exclude = Exclude.None, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public SortedSetEntry? SortedSetPop(RedisKey key, Order order = Order.Ascending, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public SortedSetEntry[] SortedSetPop(RedisKey key, long count, Order order = Order.Ascending, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public SortedSetPopResult SortedSetPop(RedisKey[] keys, long count, Order order = Order.Ascending, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<SortedSetEntry?> SortedSetPopAsync(RedisKey key, Order order = Order.Ascending, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<SortedSetEntry[]> SortedSetPopAsync(RedisKey key, long count, Order order = Order.Ascending, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<SortedSetPopResult> SortedSetPopAsync(RedisKey[] keys, long count, Order order = Order.Ascending, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue SortedSetRandomMember(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue> SortedSetRandomMemberAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue[] SortedSetRandomMembers(RedisKey key, long count, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue[]> SortedSetRandomMembersAsync(RedisKey key, long count, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public SortedSetEntry[] SortedSetRandomMembersWithScores(RedisKey key, long count, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<SortedSetEntry[]> SortedSetRandomMembersWithScoresAsync(RedisKey key, long count, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long SortedSetRangeAndStore(RedisKey sourceKey, RedisKey destinationKey, RedisValue start, RedisValue stop, SortedSetOrder sortedSetOrder = SortedSetOrder.ByRank, Exclude exclude = Exclude.None, Order order = Order.Ascending, long skip = 0, long? take = null, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> SortedSetRangeAndStoreAsync(RedisKey sourceKey, RedisKey destinationKey, RedisValue start, RedisValue stop, SortedSetOrder sortedSetOrder = SortedSetOrder.ByRank, Exclude exclude = Exclude.None, Order order = Order.Ascending, long skip = 0, long? take = null, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue[] SortedSetRangeByRank(RedisKey key, long start = 0, long stop = -1, Order order = Order.Ascending, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue[]> SortedSetRangeByRankAsync(RedisKey key, long start = 0, long stop = -1, Order order = Order.Ascending, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public SortedSetEntry[] SortedSetRangeByRankWithScores(RedisKey key, long start = 0, long stop = -1, Order order = Order.Ascending, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<SortedSetEntry[]> SortedSetRangeByRankWithScoresAsync(RedisKey key, long start = 0, long stop = -1, Order order = Order.Ascending, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue[] SortedSetRangeByScore(RedisKey key, double start = double.NegativeInfinity, double stop = double.PositiveInfinity, Exclude exclude = Exclude.None, Order order = Order.Ascending, long skip = 0, long take = -1, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue[]> SortedSetRangeByScoreAsync(RedisKey key, double start = double.NegativeInfinity, double stop = double.PositiveInfinity, Exclude exclude = Exclude.None, Order order = Order.Ascending, long skip = 0, long take = -1, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public SortedSetEntry[] SortedSetRangeByScoreWithScores(RedisKey key, double start = double.NegativeInfinity, double stop = double.PositiveInfinity, Exclude exclude = Exclude.None, Order order = Order.Ascending, long skip = 0, long take = -1, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<SortedSetEntry[]> SortedSetRangeByScoreWithScoresAsync(RedisKey key, double start = double.NegativeInfinity, double stop = double.PositiveInfinity, Exclude exclude = Exclude.None, Order order = Order.Ascending, long skip = 0, long take = -1, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue[] SortedSetRangeByValue(RedisKey key, RedisValue min, RedisValue max, Exclude exclude, long skip, long take = -1, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue[] SortedSetRangeByValue(RedisKey key, RedisValue min = default, RedisValue max = default, Exclude exclude = Exclude.None, Order order = Order.Ascending, long skip = 0, long take = -1, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue[]> SortedSetRangeByValueAsync(RedisKey key, RedisValue min, RedisValue max, Exclude exclude, long skip, long take = -1, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue[]> SortedSetRangeByValueAsync(RedisKey key, RedisValue min = default, RedisValue max = default, Exclude exclude = Exclude.None, Order order = Order.Ascending, long skip = 0, long take = -1, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long? SortedSetRank(RedisKey key, RedisValue member, Order order = Order.Ascending, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long?> SortedSetRankAsync(RedisKey key, RedisValue member, Order order = Order.Ascending, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool SortedSetRemove(RedisKey key, RedisValue member, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long SortedSetRemove(RedisKey key, RedisValue[] members, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool> SortedSetRemoveAsync(RedisKey key, RedisValue member, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> SortedSetRemoveAsync(RedisKey key, RedisValue[] members, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long SortedSetRemoveRangeByRank(RedisKey key, long start, long stop, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> SortedSetRemoveRangeByRankAsync(RedisKey key, long start, long stop, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long SortedSetRemoveRangeByScore(RedisKey key, double start, double stop, Exclude exclude = Exclude.None, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> SortedSetRemoveRangeByScoreAsync(RedisKey key, double start, double stop, Exclude exclude = Exclude.None, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long SortedSetRemoveRangeByValue(RedisKey key, RedisValue min, RedisValue max, Exclude exclude = Exclude.None, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> SortedSetRemoveRangeByValueAsync(RedisKey key, RedisValue min, RedisValue max, Exclude exclude = Exclude.None, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public IEnumerable<SortedSetEntry> SortedSetScan(RedisKey key, RedisValue pattern, int pageSize, CommandFlags flags) => throw new NotImplementedException();
public IEnumerable<SortedSetEntry> SortedSetScan(RedisKey key, RedisValue pattern = default, int pageSize = 250, long cursor = 0, int pageOffset = 0, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public IAsyncEnumerable<SortedSetEntry> SortedSetScanAsync(RedisKey key, RedisValue pattern = default, int pageSize = 250, long cursor = 0, int pageOffset = 0, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public double? SortedSetScore(RedisKey key, RedisValue member, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<double?> SortedSetScoreAsync(RedisKey key, RedisValue member, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public double?[] SortedSetScores(RedisKey key, RedisValue[] members, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<double?[]> SortedSetScoresAsync(RedisKey key, RedisValue[] members, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool SortedSetUpdate(RedisKey key, RedisValue member, double score, SortedSetWhen when = SortedSetWhen.Always, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long SortedSetUpdate(RedisKey key, SortedSetEntry[] values, SortedSetWhen when = SortedSetWhen.Always, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool> SortedSetUpdateAsync(RedisKey key, RedisValue member, double score, SortedSetWhen when = SortedSetWhen.Always, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> SortedSetUpdateAsync(RedisKey key, SortedSetEntry[] values, SortedSetWhen when = SortedSetWhen.Always, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long StreamAcknowledge(RedisKey key, RedisValue groupName, RedisValue messageId, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long StreamAcknowledge(RedisKey key, RedisValue groupName, RedisValue[] messageIds, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> StreamAcknowledgeAsync(RedisKey key, RedisValue groupName, RedisValue messageId, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> StreamAcknowledgeAsync(RedisKey key, RedisValue groupName, RedisValue[] messageIds, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue StreamAdd(RedisKey key, RedisValue streamField, RedisValue streamValue, RedisValue? messageId = null, int? maxLength = null, bool useApproximateMaxLength = false, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue StreamAdd(RedisKey key, NameValueEntry[] streamPairs, RedisValue? messageId = null, int? maxLength = null, bool useApproximateMaxLength = false, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue> StreamAddAsync(RedisKey key, RedisValue streamField, RedisValue streamValue, RedisValue? messageId = null, int? maxLength = null, bool useApproximateMaxLength = false, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue> StreamAddAsync(RedisKey key, NameValueEntry[] streamPairs, RedisValue? messageId = null, int? maxLength = null, bool useApproximateMaxLength = false, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public StreamAutoClaimResult StreamAutoClaim(RedisKey key, RedisValue consumerGroup, RedisValue claimingConsumer, long minIdleTimeInMs, RedisValue startAtId, int? count = null, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<StreamAutoClaimResult> StreamAutoClaimAsync(RedisKey key, RedisValue consumerGroup, RedisValue claimingConsumer, long minIdleTimeInMs, RedisValue startAtId, int? count = null, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public StreamAutoClaimIdsOnlyResult StreamAutoClaimIdsOnly(RedisKey key, RedisValue consumerGroup, RedisValue claimingConsumer, long minIdleTimeInMs, RedisValue startAtId, int? count = null, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<StreamAutoClaimIdsOnlyResult> StreamAutoClaimIdsOnlyAsync(RedisKey key, RedisValue consumerGroup, RedisValue claimingConsumer, long minIdleTimeInMs, RedisValue startAtId, int? count = null, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public StreamEntry[] StreamClaim(RedisKey key, RedisValue consumerGroup, RedisValue claimingConsumer, long minIdleTimeInMs, RedisValue[] messageIds, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<StreamEntry[]> StreamClaimAsync(RedisKey key, RedisValue consumerGroup, RedisValue claimingConsumer, long minIdleTimeInMs, RedisValue[] messageIds, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue[] StreamClaimIdsOnly(RedisKey key, RedisValue consumerGroup, RedisValue claimingConsumer, long minIdleTimeInMs, RedisValue[] messageIds, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue[]> StreamClaimIdsOnlyAsync(RedisKey key, RedisValue consumerGroup, RedisValue claimingConsumer, long minIdleTimeInMs, RedisValue[] messageIds, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool StreamConsumerGroupSetPosition(RedisKey key, RedisValue groupName, RedisValue position, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool> StreamConsumerGroupSetPositionAsync(RedisKey key, RedisValue groupName, RedisValue position, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public StreamConsumerInfo[] StreamConsumerInfo(RedisKey key, RedisValue groupName, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<StreamConsumerInfo[]> StreamConsumerInfoAsync(RedisKey key, RedisValue groupName, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool StreamCreateConsumerGroup(RedisKey key, RedisValue groupName, RedisValue? position, CommandFlags flags) => throw new NotImplementedException();
public bool StreamCreateConsumerGroup(RedisKey key, RedisValue groupName, RedisValue? position = null, bool createStream = true, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool> StreamCreateConsumerGroupAsync(RedisKey key, RedisValue groupName, RedisValue? position, CommandFlags flags) => throw new NotImplementedException();
public Task<bool> StreamCreateConsumerGroupAsync(RedisKey key, RedisValue groupName, RedisValue? position = null, bool createStream = true, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long StreamDelete(RedisKey key, RedisValue[] messageIds, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> StreamDeleteAsync(RedisKey key, RedisValue[] messageIds, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long StreamDeleteConsumer(RedisKey key, RedisValue groupName, RedisValue consumerName, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> StreamDeleteConsumerAsync(RedisKey key, RedisValue groupName, RedisValue consumerName, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool StreamDeleteConsumerGroup(RedisKey key, RedisValue groupName, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool> StreamDeleteConsumerGroupAsync(RedisKey key, RedisValue groupName, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public StreamGroupInfo[] StreamGroupInfo(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<StreamGroupInfo[]> StreamGroupInfoAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public StreamInfo StreamInfo(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<StreamInfo> StreamInfoAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long StreamLength(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> StreamLengthAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public StreamPendingInfo StreamPending(RedisKey key, RedisValue groupName, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<StreamPendingInfo> StreamPendingAsync(RedisKey key, RedisValue groupName, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public StreamPendingMessageInfo[] StreamPendingMessages(RedisKey key, RedisValue groupName, int count, RedisValue consumerName, RedisValue? minId = null, RedisValue? maxId = null, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<StreamPendingMessageInfo[]> StreamPendingMessagesAsync(RedisKey key, RedisValue groupName, int count, RedisValue consumerName, RedisValue? minId = null, RedisValue? maxId = null, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public StreamEntry[] StreamRange(RedisKey key, RedisValue? minId = null, RedisValue? maxId = null, int? count = null, Order messageOrder = Order.Ascending, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<StreamEntry[]> StreamRangeAsync(RedisKey key, RedisValue? minId = null, RedisValue? maxId = null, int? count = null, Order messageOrder = Order.Ascending, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public StreamEntry[] StreamRead(RedisKey key, RedisValue position, int? count = null, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisStream[] StreamRead(StreamPosition[] streamPositions, int? countPerStream = null, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<StreamEntry[]> StreamReadAsync(RedisKey key, RedisValue position, int? count = null, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisStream[]> StreamReadAsync(StreamPosition[] streamPositions, int? countPerStream = null, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public StreamEntry[] StreamReadGroup(RedisKey key, RedisValue groupName, RedisValue consumerName, RedisValue? position, int? count, CommandFlags flags) => throw new NotImplementedException();
public StreamEntry[] StreamReadGroup(RedisKey key, RedisValue groupName, RedisValue consumerName, RedisValue? position = null, int? count = null, bool noAck = false, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisStream[] StreamReadGroup(StreamPosition[] streamPositions, RedisValue groupName, RedisValue consumerName, int? countPerStream, CommandFlags flags) => throw new NotImplementedException();
public RedisStream[] StreamReadGroup(StreamPosition[] streamPositions, RedisValue groupName, RedisValue consumerName, int? countPerStream = null, bool noAck = false, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<StreamEntry[]> StreamReadGroupAsync(RedisKey key, RedisValue groupName, RedisValue consumerName, RedisValue? position, int? count, CommandFlags flags) => throw new NotImplementedException();
public Task<StreamEntry[]> StreamReadGroupAsync(RedisKey key, RedisValue groupName, RedisValue consumerName, RedisValue? position = null, int? count = null, bool noAck = false, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisStream[]> StreamReadGroupAsync(StreamPosition[] streamPositions, RedisValue groupName, RedisValue consumerName, int? countPerStream, CommandFlags flags) => throw new NotImplementedException();
public Task<RedisStream[]> StreamReadGroupAsync(StreamPosition[] streamPositions, RedisValue groupName, RedisValue consumerName, int? countPerStream = null, bool noAck = false, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long StreamTrim(RedisKey key, int maxLength, bool useApproximateMaxLength = false, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> StreamTrimAsync(RedisKey key, int maxLength, bool useApproximateMaxLength = false, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long StringAppend(RedisKey key, RedisValue value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> StringAppendAsync(RedisKey key, RedisValue value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long StringBitCount(RedisKey key, long start, long end, CommandFlags flags) => throw new NotImplementedException();
public long StringBitCount(RedisKey key, long start = 0, long end = -1, StringIndexType indexType = StringIndexType.Byte, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> StringBitCountAsync(RedisKey key, long start, long end, CommandFlags flags) => throw new NotImplementedException();
public Task<long> StringBitCountAsync(RedisKey key, long start = 0, long end = -1, StringIndexType indexType = StringIndexType.Byte, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long StringBitOperation(Bitwise operation, RedisKey destination, RedisKey first, RedisKey second = default, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long StringBitOperation(Bitwise operation, RedisKey destination, RedisKey[] keys, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> StringBitOperationAsync(Bitwise operation, RedisKey destination, RedisKey first, RedisKey second = default, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> StringBitOperationAsync(Bitwise operation, RedisKey destination, RedisKey[] keys, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long StringBitPosition(RedisKey key, bool bit, long start, long end, CommandFlags flags) => throw new NotImplementedException();
public long StringBitPosition(RedisKey key, bool bit, long start = 0, long end = -1, StringIndexType indexType = StringIndexType.Byte, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> StringBitPositionAsync(RedisKey key, bool bit, long start, long end, CommandFlags flags) => throw new NotImplementedException();
public Task<long> StringBitPositionAsync(RedisKey key, bool bit, long start = 0, long end = -1, StringIndexType indexType = StringIndexType.Byte, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long StringDecrement(RedisKey key, long value = 1, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public double StringDecrement(RedisKey key, double value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> StringDecrementAsync(RedisKey key, long value = 1, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<double> StringDecrementAsync(RedisKey key, double value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue StringGet(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue[] StringGet(RedisKey[] keys, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue> StringGetAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue[]> StringGetAsync(RedisKey[] keys, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool StringGetBit(RedisKey key, long offset, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool> StringGetBitAsync(RedisKey key, long offset, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue StringGetDelete(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue> StringGetDeleteAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Lease<byte>? StringGetLease(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<Lease<byte>?> StringGetLeaseAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue StringGetRange(RedisKey key, long start, long end, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue> StringGetRangeAsync(RedisKey key, long start, long end, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue StringGetSet(RedisKey key, RedisValue value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue> StringGetSetAsync(RedisKey key, RedisValue value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue StringGetSetExpiry(RedisKey key, TimeSpan? expiry, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue StringGetSetExpiry(RedisKey key, DateTime expiry, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue> StringGetSetExpiryAsync(RedisKey key, TimeSpan? expiry, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue> StringGetSetExpiryAsync(RedisKey key, DateTime expiry, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValueWithExpiry StringGetWithExpiry(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValueWithExpiry> StringGetWithExpiryAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long StringIncrement(RedisKey key, long value = 1, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public double StringIncrement(RedisKey key, double value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> StringIncrementAsync(RedisKey key, long value = 1, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<double> StringIncrementAsync(RedisKey key, double value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long StringLength(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> StringLengthAsync(RedisKey key, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public string? StringLongestCommonSubsequence(RedisKey first, RedisKey second, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<string?> StringLongestCommonSubsequenceAsync(RedisKey first, RedisKey second, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public long StringLongestCommonSubsequenceLength(RedisKey first, RedisKey second, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<long> StringLongestCommonSubsequenceLengthAsync(RedisKey first, RedisKey second, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public LCSMatchResult StringLongestCommonSubsequenceWithMatches(RedisKey first, RedisKey second, long minLength = 0, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<LCSMatchResult> StringLongestCommonSubsequenceWithMatchesAsync(RedisKey first, RedisKey second, long minLength = 0, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool StringSet(RedisKey key, RedisValue value, TimeSpan? expiry, When when) => throw new NotImplementedException();
public bool StringSet(RedisKey key, RedisValue value, TimeSpan? expiry, When when, CommandFlags flags) => throw new NotImplementedException();
public bool StringSet(RedisKey key, RedisValue value, TimeSpan? expiry = null, bool keepTtl = false, When when = When.Always, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool StringSet(KeyValuePair<RedisKey, RedisValue>[] values, When when = When.Always, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue StringSetAndGet(RedisKey key, RedisValue value, TimeSpan? expiry, When when, CommandFlags flags) => throw new NotImplementedException();
public RedisValue StringSetAndGet(RedisKey key, RedisValue value, TimeSpan? expiry = null, bool keepTtl = false, When when = When.Always, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue> StringSetAndGetAsync(RedisKey key, RedisValue value, TimeSpan? expiry, When when, CommandFlags flags) => throw new NotImplementedException();
public Task<RedisValue> StringSetAndGetAsync(RedisKey key, RedisValue value, TimeSpan? expiry = null, bool keepTtl = false, When when = When.Always, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool> StringSetAsync(RedisKey key, RedisValue value, TimeSpan? expiry, When when) => throw new NotImplementedException();
public Task<bool> StringSetAsync(RedisKey key, RedisValue value, TimeSpan? expiry, When when, CommandFlags flags) => throw new NotImplementedException();
public Task<bool> StringSetAsync(RedisKey key, RedisValue value, TimeSpan? expiry = null, bool keepTtl = false, When when = When.Always, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool> StringSetAsync(KeyValuePair<RedisKey, RedisValue>[] values, When when = When.Always, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool StringSetBit(RedisKey key, long offset, bool bit, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<bool> StringSetBitAsync(RedisKey key, long offset, bool bit, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public RedisValue StringSetRange(RedisKey key, long offset, RedisValue value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public Task<RedisValue> StringSetRangeAsync(RedisKey key, long offset, RedisValue value, CommandFlags flags = CommandFlags.None) => throw new NotImplementedException();
public bool TryWait(Task task) => throw new NotImplementedException();
public void Wait(Task task) => throw new NotImplementedException();
public T Wait<T>(Task<T> task) => throw new NotImplementedException();
public void WaitAll(params Task[] tasks) => throw new NotImplementedException();
}
@@ -0,0 +1,24 @@
// Copyright (c) Microsoft. All rights reserved.
using Redis.ConformanceTests.Support;
using VectorData.ConformanceTests.ModelTests;
using VectorData.ConformanceTests.Support;
using Xunit;
namespace Redis.ConformanceTests.ModelTests;
public class RedisHashSetBasicModelTests(RedisHashSetBasicModelTests.Fixture fixture)
: BasicModelTests<string>(fixture), IClassFixture<RedisHashSetBasicModelTests.Fixture>
{
public override async Task GetAsync_with_filter_and_multiple_OrderBys()
{
var exception = await Assert.ThrowsAsync<NotSupportedException>(base.GetAsync_with_filter_and_multiple_OrderBys);
Assert.Equal("Redis does not support ordering by more than one property.", exception.Message);
}
public new class Fixture : BasicModelTests<string>.Fixture
{
public override TestStore TestStore => RedisTestStore.HashSetInstance;
}
}
@@ -0,0 +1,24 @@
// Copyright (c) Microsoft. All rights reserved.
using Redis.ConformanceTests.Support;
using VectorData.ConformanceTests.ModelTests;
using VectorData.ConformanceTests.Support;
using Xunit;
namespace Redis.ConformanceTests.ModelTests;
public class RedisHashSetDynamicModelTests(RedisHashSetDynamicModelTests.Fixture fixture)
: DynamicModelTests<string>(fixture), IClassFixture<RedisHashSetDynamicModelTests.Fixture>
{
public override async Task GetAsync_with_filter_and_multiple_OrderBys()
{
var exception = await Assert.ThrowsAsync<NotSupportedException>(base.GetAsync_with_filter_and_multiple_OrderBys);
Assert.Equal("Redis does not support ordering by more than one property.", exception.Message);
}
public new class Fixture : DynamicModelTests<string>.Fixture
{
public override TestStore TestStore => RedisTestStore.HashSetInstance;
}
}
@@ -0,0 +1,17 @@
// Copyright (c) Microsoft. All rights reserved.
using Redis.ConformanceTests.Support;
using VectorData.ConformanceTests.ModelTests;
using VectorData.ConformanceTests.Support;
using Xunit;
namespace Redis.ConformanceTests.ModelTests;
public class RedisHashSetMultiVectorModelTests(RedisHashSetMultiVectorModelTests.Fixture fixture)
: MultiVectorModelTests<string>(fixture), IClassFixture<RedisHashSetMultiVectorModelTests.Fixture>
{
public new class Fixture : MultiVectorModelTests<string>.Fixture
{
public override TestStore TestStore => RedisTestStore.HashSetInstance;
}
}
@@ -0,0 +1,34 @@
// Copyright (c) Microsoft. All rights reserved.
using Redis.ConformanceTests.Support;
using VectorData.ConformanceTests.ModelTests;
using VectorData.ConformanceTests.Support;
using Xunit;
namespace Redis.ConformanceTests.ModelTests;
public class RedisHashSetNoDataModelTests(RedisHashSetNoDataModelTests.Fixture fixture)
: NoDataModelTests<string>(fixture), IClassFixture<RedisHashSetNoDataModelTests.Fixture>
{
public override async Task GetAsync_single_record(bool includeVectors)
{
var expectedRecord = fixture.TestData[0];
var received = await this.Collection.GetAsync(expectedRecord.Key, new() { IncludeVectors = includeVectors });
if (includeVectors)
{
expectedRecord.AssertEqual(received, includeVectors, fixture.TestStore.VectorsComparable);
}
else
{
// When vectors aren't included and there's no other data, we get null back.
Assert.Null(received);
}
}
public new class Fixture : NoDataModelTests<string>.Fixture
{
public override TestStore TestStore => RedisTestStore.HashSetInstance;
}
}
@@ -0,0 +1,17 @@
// Copyright (c) Microsoft. All rights reserved.
using Redis.ConformanceTests.Support;
using VectorData.ConformanceTests.ModelTests;
using VectorData.ConformanceTests.Support;
using Xunit;
namespace Redis.ConformanceTests.ModelTests;
public class RedisHashSetNoVectorModelTests(RedisHashSetNoVectorModelTests.Fixture fixture)
: NoVectorModelTests<string>(fixture), IClassFixture<RedisHashSetNoVectorModelTests.Fixture>
{
public new class Fixture : NoVectorModelTests<string>.Fixture
{
public override TestStore TestStore => RedisTestStore.HashSetInstance;
}
}
@@ -0,0 +1,24 @@
// Copyright (c) Microsoft. All rights reserved.
using Redis.ConformanceTests.Support;
using VectorData.ConformanceTests.ModelTests;
using VectorData.ConformanceTests.Support;
using Xunit;
namespace Redis.ConformanceTests.ModelTests;
public class RedisJsonBasicModelTests(RedisJsonBasicModelTests.Fixture fixture)
: BasicModelTests<string>(fixture), IClassFixture<RedisJsonBasicModelTests.Fixture>
{
public override async Task GetAsync_with_filter_and_multiple_OrderBys()
{
var exception = await Assert.ThrowsAsync<NotSupportedException>(base.GetAsync_with_filter_and_multiple_OrderBys);
Assert.Equal("Redis does not support ordering by more than one property.", exception.Message);
}
public new class Fixture : BasicModelTests<string>.Fixture
{
public override TestStore TestStore => RedisTestStore.JsonInstance;
}
}
@@ -0,0 +1,24 @@
// Copyright (c) Microsoft. All rights reserved.
using Redis.ConformanceTests.Support;
using VectorData.ConformanceTests.ModelTests;
using VectorData.ConformanceTests.Support;
using Xunit;
namespace Redis.ConformanceTests.ModelTests;
public class RedisJsonDynamicModelTests(RedisJsonDynamicModelTests.Fixture fixture)
: DynamicModelTests<string>(fixture), IClassFixture<RedisJsonDynamicModelTests.Fixture>
{
public override async Task GetAsync_with_filter_and_multiple_OrderBys()
{
var exception = await Assert.ThrowsAsync<NotSupportedException>(base.GetAsync_with_filter_and_multiple_OrderBys);
Assert.Equal("Redis does not support ordering by more than one property.", exception.Message);
}
public new class Fixture : DynamicModelTests<string>.Fixture
{
public override TestStore TestStore => RedisTestStore.JsonInstance;
}
}
@@ -0,0 +1,17 @@
// Copyright (c) Microsoft. All rights reserved.
using Redis.ConformanceTests.Support;
using VectorData.ConformanceTests.ModelTests;
using VectorData.ConformanceTests.Support;
using Xunit;
namespace Redis.ConformanceTests.ModelTests;
public class RedisJsonMultiVectorModelTests(RedisJsonMultiVectorModelTests.Fixture fixture)
: MultiVectorModelTests<string>(fixture), IClassFixture<RedisJsonMultiVectorModelTests.Fixture>
{
public new class Fixture : MultiVectorModelTests<string>.Fixture
{
public override TestStore TestStore => RedisTestStore.JsonInstance;
}
}
@@ -0,0 +1,17 @@
// Copyright (c) Microsoft. All rights reserved.
using Redis.ConformanceTests.Support;
using VectorData.ConformanceTests.ModelTests;
using VectorData.ConformanceTests.Support;
using Xunit;
namespace Redis.ConformanceTests.ModelTests;
public class RedisJsonNoDataModelTests(RedisJsonNoDataModelTests.Fixture fixture)
: NoDataModelTests<string>(fixture), IClassFixture<RedisJsonNoDataModelTests.Fixture>
{
public new class Fixture : NoDataModelTests<string>.Fixture
{
public override TestStore TestStore => RedisTestStore.JsonInstance;
}
}
@@ -0,0 +1,17 @@
// Copyright (c) Microsoft. All rights reserved.
using Redis.ConformanceTests.Support;
using VectorData.ConformanceTests.ModelTests;
using VectorData.ConformanceTests.Support;
using Xunit;
namespace Redis.ConformanceTests.ModelTests;
public class RedisJsonNoVectorModelTests(RedisJsonNoVectorModelTests.Fixture fixture)
: NoVectorModelTests<string>(fixture), IClassFixture<RedisJsonNoVectorModelTests.Fixture>
{
public new class Fixture : NoVectorModelTests<string>.Fixture
{
public override TestStore TestStore => RedisTestStore.JsonInstance;
}
}
@@ -0,0 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net10.0;net472</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsTestProject>true</IsTestProject>
<IsPackable>false</IsPackable>
<RootNamespace>Redis.ConformanceTests</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="Testcontainers.Redis" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\src\VectorData\Redis\Redis.csproj" />
<ProjectReference Include="..\VectorData.ConformanceTests\VectorData.ConformanceTests.csproj" />
</ItemGroup>
</Project>
@@ -0,0 +1,179 @@
// Copyright (c) Microsoft. All rights reserved.
using Microsoft.Extensions.VectorData;
using Microsoft.SemanticKernel.Connectors.Redis;
using Redis.ConformanceTests.Support;
using VectorData.ConformanceTests;
using VectorData.ConformanceTests.Support;
using Xunit;
using Xunit.Sdk;
namespace Redis.ConformanceTests;
public abstract class RedisFilterTests(FilterTests<string>.Fixture fixture)
: FilterTests<string>(fixture)
{
#region Equality with null
public override Task Equal_with_null_reference_type()
=> Assert.ThrowsAsync<NotSupportedException>(() => base.Equal_with_null_reference_type());
public override Task Equal_with_null_captured()
=> Assert.ThrowsAsync<NotSupportedException>(() => base.Equal_with_null_captured());
public override Task NotEqual_with_null_reference_type()
=> Assert.ThrowsAsync<NotSupportedException>(() => base.Equal_with_null_reference_type());
public override Task NotEqual_with_null_captured()
=> Assert.ThrowsAsync<NotSupportedException>(() => base.NotEqual_with_null_captured());
public override Task Equal_int_property_with_null_nullable_int()
=> Assert.ThrowsAsync<NotSupportedException>(() => base.Equal_int_property_with_null_nullable_int());
#endregion
#region Bool
public override Task Bool()
=> Assert.ThrowsAsync<InvalidOperationException>(() => base.Bool());
public override Task Not_over_bool()
=> Assert.ThrowsAsync<InvalidOperationException>(() => base.Not_over_bool());
public override Task Bool_And_Bool()
=> Assert.ThrowsAsync<InvalidOperationException>(() => base.Bool_And_Bool());
public override Task Bool_Or_Not_Bool()
=> Assert.ThrowsAsync<InvalidOperationException>(() => base.Bool_Or_Not_Bool());
public override Task Not_over_bool_And_Comparison()
=> Assert.ThrowsAsync<InvalidOperationException>(() => base.Not_over_bool_And_Comparison());
#endregion
#region Contains
public override Task Contains_over_inline_int_array()
=> Assert.ThrowsAsync<NotSupportedException>(() => base.Contains_over_inline_int_array());
public override Task Contains_over_inline_string_array()
=> Assert.ThrowsAsync<NotSupportedException>(() => base.Contains_over_inline_string_array());
public override Task Contains_over_inline_string_array_with_weird_chars()
=> Assert.ThrowsAsync<NotSupportedException>(() => base.Contains_over_inline_string_array_with_weird_chars());
public override Task Contains_over_captured_string_array()
=> Assert.ThrowsAsync<NotSupportedException>(() => base.Contains_over_captured_string_array());
#endregion
}
public class RedisJsonFilterTests(RedisJsonFilterTests.Fixture fixture)
: RedisFilterTests(fixture), IClassFixture<RedisJsonFilterTests.Fixture>
{
public new class Fixture : FilterTests<string>.Fixture
{
public override TestStore TestStore => RedisTestStore.JsonInstance;
protected override string CollectionNameBase => "JsonFilterTests";
// Override to remove the bool property, which isn't (currently) supported on Redis/JSON
public override VectorStoreCollectionDefinition CreateRecordDefinition()
=> new()
{
Properties = base.CreateRecordDefinition().Properties.Where(p => p.Type != typeof(bool)).ToList()
};
protected override VectorStoreCollection<string, FilterRecord> GetCollection()
=> new RedisJsonCollection<string, FilterRecord>(
RedisTestStore.JsonInstance.Database,
this.CollectionName,
new() { Definition = this.CreateRecordDefinition() });
}
}
public class RedisHashSetFilterTests(RedisHashSetFilterTests.Fixture fixture)
: RedisFilterTests(fixture), IClassFixture<RedisHashSetFilterTests.Fixture>
{
// Null values are not supported in Redis HashSet
public override Task Equal_with_null_reference_type()
=> Assert.ThrowsAsync<ThrowsException>(() => base.Equal_with_null_reference_type());
public override Task Equal_with_null_captured()
=> Assert.ThrowsAsync<ThrowsException>(() => base.Equal_with_null_captured());
public override Task NotEqual_with_null_reference_type()
=> Assert.ThrowsAsync<ThrowsException>(() => base.NotEqual_with_null_reference_type());
public override Task NotEqual_with_null_captured()
=> Assert.ThrowsAsync<ThrowsException>(() => base.NotEqual_with_null_captured());
// Array fields not supported on Redis HashSet
public override Task Contains_over_field_string_array()
=> Assert.ThrowsAsync<InvalidOperationException>(() => base.Contains_over_field_string_array());
public override Task Contains_over_field_string_List()
=> Assert.ThrowsAsync<InvalidOperationException>(() => base.Contains_over_field_string_List());
public override Task Contains_with_Enumerable_Contains()
=> Assert.ThrowsAsync<InvalidOperationException>(() => base.Contains_with_Enumerable_Contains());
#if !NETFRAMEWORK
public override Task Contains_with_MemoryExtensions_Contains()
=> Assert.ThrowsAsync<InvalidOperationException>(() => base.Contains_with_MemoryExtensions_Contains());
#endif
#if NET10_0_OR_GREATER
public override Task Contains_with_MemoryExtensions_Contains_with_null_comparer()
=> Assert.ThrowsAsync<InvalidOperationException>(() => base.Contains_with_MemoryExtensions_Contains_with_null_comparer());
#endif
// Array fields not supported on Redis HashSet - Any tests
public override Task Any_with_Contains_over_inline_string_array()
=> Assert.ThrowsAsync<InvalidOperationException>(() => base.Any_with_Contains_over_inline_string_array());
public override Task Any_with_Contains_over_captured_string_array()
=> Assert.ThrowsAsync<InvalidOperationException>(() => base.Any_with_Contains_over_captured_string_array());
public override Task Any_with_Contains_over_captured_string_list()
=> Assert.ThrowsAsync<InvalidOperationException>(() => base.Any_with_Contains_over_captured_string_list());
public override Task Any_over_List_with_Contains_over_captured_string_array()
=> Assert.ThrowsAsync<InvalidOperationException>(() => base.Any_over_List_with_Contains_over_captured_string_array());
public new class Fixture : FilterTests<string>.Fixture
{
public override TestStore TestStore => RedisTestStore.HashSetInstance;
protected override string CollectionNameBase => "HashSetCollectionFilterTests";
// Override to remove the bool property, which isn't (currently) supported on Redis
public override VectorStoreCollectionDefinition CreateRecordDefinition()
=> new()
{
Properties = base.CreateRecordDefinition().Properties.Where(p =>
p.Type != typeof(bool) &&
p.Type != typeof(string[]) &&
p.Type != typeof(List<string>)).ToList()
};
protected override VectorStoreCollection<string, FilterRecord> GetCollection()
=> new RedisHashSetCollection<string, FilterRecord>(
RedisTestStore.HashSetInstance.Database,
this.CollectionName,
new() { Definition = this.CreateRecordDefinition() });
protected override List<FilterRecord> BuildTestData()
{
var testData = base.BuildTestData();
foreach (var record in testData)
{
// Null values are not supported in Redis hashsets
record.String ??= string.Empty;
}
return testData;
}
}
}
@@ -0,0 +1,12 @@
// Copyright (c) Microsoft. All rights reserved.
using Redis.ConformanceTests.Support;
using VectorData.ConformanceTests;
using Xunit;
namespace Redis.ConformanceTests;
public class RedisHashSetCollectionManagementTests(RedisHashSetFixture fixture)
: CollectionManagementTests<string>(fixture), IClassFixture<RedisHashSetFixture>
{
}
@@ -0,0 +1,84 @@
// Copyright (c) Microsoft. All rights reserved.
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.SemanticKernel.Connectors.Redis;
using Redis.ConformanceTests.Support;
using StackExchange.Redis;
using VectorData.ConformanceTests;
using Xunit;
namespace Redis.ConformanceTests;
public class RedisHashSetDependencyInjectionTests
: DependencyInjectionTests<RedisVectorStore, RedisHashSetCollection<string, DependencyInjectionTests<string>.Record>, string, DependencyInjectionTests<string>.Record>
{
private const string ConnectionConfiguration = "localhost:6379";
protected override void PopulateConfiguration(ConfigurationManager configuration, object? serviceKey = null)
=> configuration.AddInMemoryCollection(
[
new(CreateConfigKey("RedisHashSet", serviceKey, "Configuration"), ConnectionConfiguration),
]);
private static string Provider(IServiceProvider sp, object? serviceKey = null)
=> sp.GetRequiredService<IConfiguration>().GetRequiredSection(CreateConfigKey("RedisHashSet", serviceKey, "Configuration")).Value!;
public override IEnumerable<Func<IServiceCollection, object?, string, ServiceLifetime, IServiceCollection>> CollectionDelegates
{
get
{
yield return (services, serviceKey, name, lifetime) => serviceKey is null
? services
.AddRedisHashSetCollection<Record>(name,
sp => new FakeDatabase(Provider(sp)), lifetime: lifetime)
: services
.AddKeyedRedisHashSetCollection<Record>(serviceKey, name,
sp => new FakeDatabase(Provider(sp, serviceKey)), lifetime: lifetime);
yield return (services, serviceKey, name, lifetime) => serviceKey is null
? services
.AddSingleton<IDatabase>(new FakeDatabase(ConnectionConfiguration))
.AddRedisHashSetCollection<Record>(name, lifetime: lifetime)
: services
.AddSingleton<IDatabase>(new FakeDatabase(ConnectionConfiguration))
.AddKeyedRedisHashSetCollection<Record>(serviceKey, name, lifetime: lifetime);
yield return (services, serviceKey, name, lifetime) => services
.AddKeyedSingleton<IDatabase>(serviceKey, new FakeDatabase(ConnectionConfiguration))
.AddKeyedRedisHashSetCollection<Record>(serviceKey, name,
sp => sp.GetRequiredKeyedService<IDatabase>(serviceKey), lifetime: lifetime);
}
}
public override IEnumerable<Func<IServiceCollection, object?, ServiceLifetime, IServiceCollection>> StoreDelegates
{
get
{
yield return (services, serviceKey, lifetime) => serviceKey is null
? services
.AddSingleton<IDatabase>(new FakeDatabase(ConnectionConfiguration))
.AddRedisVectorStore(lifetime: lifetime)
: services
.AddSingleton<IDatabase>(new FakeDatabase(ConnectionConfiguration))
.AddKeyedRedisVectorStore(serviceKey, lifetime: lifetime);
}
}
[Fact]
public void ConnectionConfigurationCantBeNullOrEmpty()
{
IServiceCollection services = new ServiceCollection();
Assert.Throws<ArgumentNullException>(() => services.AddRedisVectorStore(connectionConfiguration: null!));
Assert.Throws<ArgumentException>(() => services.AddRedisVectorStore(connectionConfiguration: ""));
Assert.Throws<ArgumentNullException>(() => services.AddKeyedRedisVectorStore("serviceKey", connectionConfiguration: null!));
Assert.Throws<ArgumentException>(() => services.AddKeyedRedisVectorStore("serviceKey", connectionConfiguration: ""));
Assert.Throws<ArgumentNullException>(() => services.AddRedisHashSetCollection<Record>(
name: "notNull", connectionConfiguration: null!));
Assert.Throws<ArgumentException>(() => services.AddRedisHashSetCollection<Record>(
name: "notNull", connectionConfiguration: ""));
}
}
@@ -0,0 +1,33 @@
// Copyright (c) Microsoft. All rights reserved.
using Redis.ConformanceTests.Support;
using VectorData.ConformanceTests;
using VectorData.ConformanceTests.Support;
using Xunit;
using Xunit.Sdk;
namespace Redis.ConformanceTests;
public class RedisHashSetDistanceFunctionTests(RedisHashSetDistanceFunctionTests.Fixture fixture)
: DistanceFunctionTests<string>(fixture), IClassFixture<RedisHashSetDistanceFunctionTests.Fixture>
{
// Excluding DotProductSimilarity from the test even though Redis supports it, because the values that redis returns
// are neither DotProductSimilarity nor NegativeDotProduct, but rather 1 - DotProductSimilarity.
public override Task DotProductSimilarity() => Assert.ThrowsAsync<EqualException>(base.DotProductSimilarity);
public override Task EuclideanDistance() => Assert.ThrowsAsync<NotSupportedException>(base.EuclideanDistance);
public override Task NegativeDotProductSimilarity() => Assert.ThrowsAsync<NotSupportedException>(base.NegativeDotProductSimilarity);
public override Task HammingDistance() => Assert.ThrowsAsync<NotSupportedException>(base.HammingDistance);
public override Task ManhattanDistance() => Assert.ThrowsAsync<NotSupportedException>(base.ManhattanDistance);
public new class Fixture() : DistanceFunctionTests<string>.Fixture
{
private int _collectionCounter;
public override TestStore TestStore => RedisTestStore.HashSetInstance;
// Redis doesn't seem to reliably delete the collection: when running multiple tests that delete and recreate the collection with different key types,
// we seem to get key values from the previous collection despite having deleted and recreated it. So we uniquify the collection name instead.
public override string CollectionName => "DistanceFunctionTests" + (++this._collectionCounter);
}
}
@@ -0,0 +1,60 @@
// Copyright (c) Microsoft. All rights reserved.
using Microsoft.Extensions.AI;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.VectorData;
using Microsoft.SemanticKernel.Connectors.Redis;
using Redis.ConformanceTests.Support;
using VectorData.ConformanceTests;
using VectorData.ConformanceTests.Support;
using Xunit;
namespace Redis.ConformanceTests;
public class RedisHashSetEmbeddingGenerationTests(RedisHashSetEmbeddingGenerationTests.StringVectorFixture stringVectorFixture, RedisHashSetEmbeddingGenerationTests.RomOfFloatVectorFixture romOfFloatVectorFixture)
: EmbeddingGenerationTests<string>(stringVectorFixture, romOfFloatVectorFixture), IClassFixture<RedisHashSetEmbeddingGenerationTests.StringVectorFixture>, IClassFixture<RedisHashSetEmbeddingGenerationTests.RomOfFloatVectorFixture>
{
public new class StringVectorFixture : EmbeddingGenerationTests<string>.StringVectorFixture
{
public override TestStore TestStore => RedisTestStore.HashSetInstance;
public override VectorStore CreateVectorStore(IEmbeddingGenerator? embeddingGenerator)
=> RedisTestStore.HashSetInstance.GetVectorStore(new() { StorageType = RedisStorageType.HashSet, EmbeddingGenerator = embeddingGenerator });
public override Func<IServiceCollection, IServiceCollection>[] DependencyInjectionStoreRegistrationDelegates =>
[
services => services
.AddSingleton(RedisTestStore.HashSetInstance.Database)
.AddRedisVectorStore(optionsProvider: _ => new RedisVectorStoreOptions() { StorageType = RedisStorageType.HashSet})
];
public override Func<IServiceCollection, IServiceCollection>[] DependencyInjectionCollectionRegistrationDelegates =>
[
services => services
.AddSingleton(RedisTestStore.HashSetInstance.Database)
.AddRedisHashSetCollection<RecordWithAttributes>(this.CollectionName)
];
}
public new class RomOfFloatVectorFixture : EmbeddingGenerationTests<string>.RomOfFloatVectorFixture
{
public override TestStore TestStore => RedisTestStore.HashSetInstance;
public override VectorStore CreateVectorStore(IEmbeddingGenerator? embeddingGenerator)
=> RedisTestStore.HashSetInstance.GetVectorStore(new() { StorageType = RedisStorageType.HashSet, EmbeddingGenerator = embeddingGenerator });
public override Func<IServiceCollection, IServiceCollection>[] DependencyInjectionStoreRegistrationDelegates =>
[
services => services
.AddSingleton(RedisTestStore.HashSetInstance.Database)
.AddRedisVectorStore(optionsProvider: _ => new RedisVectorStoreOptions() { StorageType = RedisStorageType.HashSet})
];
public override Func<IServiceCollection, IServiceCollection>[] DependencyInjectionCollectionRegistrationDelegates =>
[
services => services
.AddSingleton(RedisTestStore.HashSetInstance.Database)
.AddRedisHashSetCollection<RecordWithAttributes>(this.CollectionName)
];
}
}
@@ -0,0 +1,17 @@
// Copyright (c) Microsoft. All rights reserved.
using Redis.ConformanceTests.Support;
using VectorData.ConformanceTests;
using VectorData.ConformanceTests.Support;
using Xunit;
namespace Redis.ConformanceTests;
public class RedisHashSetIndexKindTests(RedisHashSetIndexKindTests.Fixture fixture)
: IndexKindTests<string>(fixture), IClassFixture<RedisHashSetIndexKindTests.Fixture>
{
public new class Fixture() : IndexKindTests<string>.Fixture
{
public override TestStore TestStore => RedisTestStore.HashSetInstance;
}
}
@@ -0,0 +1,12 @@
// Copyright (c) Microsoft. All rights reserved.
using Redis.ConformanceTests.Support;
using VectorData.ConformanceTests;
using Xunit;
namespace Redis.ConformanceTests;
public class RedisJsonCollectionManagementTests(RedisJsonFixture fixture)
: CollectionManagementTests<string>(fixture), IClassFixture<RedisJsonFixture>
{
}
@@ -0,0 +1,84 @@
// Copyright (c) Microsoft. All rights reserved.
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.SemanticKernel.Connectors.Redis;
using Redis.ConformanceTests.Support;
using StackExchange.Redis;
using VectorData.ConformanceTests;
using Xunit;
namespace Redis.ConformanceTests;
public class RedisJsonDependencyInjectionTests
: DependencyInjectionTests<RedisVectorStore, RedisJsonCollection<string, DependencyInjectionTests<string>.Record>, string, DependencyInjectionTests<string>.Record>
{
private const string ConnectionConfiguration = "localhost:6379";
protected override void PopulateConfiguration(ConfigurationManager configuration, object? serviceKey = null)
=> configuration.AddInMemoryCollection(
[
new(CreateConfigKey("RedisJson", serviceKey, "Configuration"), ConnectionConfiguration),
]);
private static string Provider(IServiceProvider sp, object? serviceKey = null)
=> sp.GetRequiredService<IConfiguration>().GetRequiredSection(CreateConfigKey("RedisJson", serviceKey, "Configuration")).Value!;
public override IEnumerable<Func<IServiceCollection, object?, string, ServiceLifetime, IServiceCollection>> CollectionDelegates
{
get
{
yield return (services, serviceKey, name, lifetime) => serviceKey is null
? services
.AddRedisJsonCollection<Record>(name,
sp => new FakeDatabase(Provider(sp)), lifetime: lifetime)
: services
.AddKeyedRedisJsonCollection<Record>(serviceKey, name,
sp => new FakeDatabase(Provider(sp, serviceKey)), lifetime: lifetime);
yield return (services, serviceKey, name, lifetime) => serviceKey is null
? services
.AddSingleton<IDatabase>(new FakeDatabase(ConnectionConfiguration))
.AddRedisJsonCollection<Record>(name, lifetime: lifetime)
: services
.AddSingleton<IDatabase>(new FakeDatabase(ConnectionConfiguration))
.AddKeyedRedisJsonCollection<Record>(serviceKey, name, lifetime: lifetime);
yield return (services, serviceKey, name, lifetime) => services
.AddKeyedSingleton<IDatabase>(serviceKey, new FakeDatabase(ConnectionConfiguration))
.AddKeyedRedisJsonCollection<Record>(serviceKey, name,
sp => sp.GetRequiredKeyedService<IDatabase>(serviceKey), lifetime: lifetime);
}
}
public override IEnumerable<Func<IServiceCollection, object?, ServiceLifetime, IServiceCollection>> StoreDelegates
{
get
{
yield return (services, serviceKey, lifetime) => serviceKey is null
? services
.AddSingleton<IDatabase>(new FakeDatabase(ConnectionConfiguration))
.AddRedisVectorStore(lifetime: lifetime)
: services
.AddSingleton<IDatabase>(new FakeDatabase(ConnectionConfiguration))
.AddKeyedRedisVectorStore(serviceKey, lifetime: lifetime);
}
}
[Fact]
public void ConnectionConfigurationCantBeNullOrEmpty()
{
IServiceCollection services = new ServiceCollection();
Assert.Throws<ArgumentNullException>(() => services.AddRedisVectorStore(connectionConfiguration: null!));
Assert.Throws<ArgumentException>(() => services.AddRedisVectorStore(connectionConfiguration: ""));
Assert.Throws<ArgumentNullException>(() => services.AddKeyedRedisVectorStore("serviceKey", connectionConfiguration: null!));
Assert.Throws<ArgumentException>(() => services.AddKeyedRedisVectorStore("serviceKey", connectionConfiguration: ""));
Assert.Throws<ArgumentNullException>(() => services.AddRedisJsonCollection<Record>(
name: "notNull", connectionConfiguration: null!));
Assert.Throws<ArgumentException>(() => services.AddRedisJsonCollection<Record>(
name: "notNull", connectionConfiguration: ""));
}
}
@@ -0,0 +1,33 @@
// Copyright (c) Microsoft. All rights reserved.
using Redis.ConformanceTests.Support;
using VectorData.ConformanceTests;
using VectorData.ConformanceTests.Support;
using Xunit;
using Xunit.Sdk;
namespace Redis.ConformanceTests;
public class RedisJsonDistanceFunctionTests(RedisJsonDistanceFunctionTests.Fixture fixture)
: DistanceFunctionTests<string>(fixture), IClassFixture<RedisJsonDistanceFunctionTests.Fixture>
{
// Excluding DotProductSimilarity from the test even though Redis supports it, because the values that redis returns
// are neither DotProductSimilarity nor NegativeDotProduct, but rather 1 - DotProductSimilarity.
public override Task DotProductSimilarity() => Assert.ThrowsAsync<EqualException>(base.DotProductSimilarity);
public override Task EuclideanDistance() => Assert.ThrowsAsync<NotSupportedException>(base.EuclideanDistance);
public override Task NegativeDotProductSimilarity() => Assert.ThrowsAsync<NotSupportedException>(base.NegativeDotProductSimilarity);
public override Task HammingDistance() => Assert.ThrowsAsync<NotSupportedException>(base.HammingDistance);
public override Task ManhattanDistance() => Assert.ThrowsAsync<NotSupportedException>(base.ManhattanDistance);
public new class Fixture() : DistanceFunctionTests<string>.Fixture
{
private int _collectionCounter;
public override TestStore TestStore => RedisTestStore.JsonInstance;
// Redis doesn't seem to reliably delete the collection: when running multiple tests that delete and recreate the collection with different key types,
// we seem to get key values from the previous collection despite having deleted and recreated it. So we uniquify the collection name instead.
public override string CollectionName => "DistanceFunctionTests" + (++this._collectionCounter);
}
}
@@ -0,0 +1,59 @@
// Copyright (c) Microsoft. All rights reserved.
using Microsoft.Extensions.AI;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.VectorData;
using Redis.ConformanceTests.Support;
using VectorData.ConformanceTests;
using VectorData.ConformanceTests.Support;
using Xunit;
namespace Redis.ConformanceTests;
public class RedisJsonEmbeddingGenerationTests(RedisJsonEmbeddingGenerationTests.StringVectorFixture stringVectorFixture, RedisJsonEmbeddingGenerationTests.RomOfFloatVectorFixture romOfFloatVectorFixture)
: EmbeddingGenerationTests<string>(stringVectorFixture, romOfFloatVectorFixture), IClassFixture<RedisJsonEmbeddingGenerationTests.StringVectorFixture>, IClassFixture<RedisJsonEmbeddingGenerationTests.RomOfFloatVectorFixture>
{
public new class StringVectorFixture : EmbeddingGenerationTests<string>.StringVectorFixture
{
public override TestStore TestStore => RedisTestStore.JsonInstance;
public override VectorStore CreateVectorStore(IEmbeddingGenerator? embeddingGenerator)
=> RedisTestStore.JsonInstance.GetVectorStore(new() { EmbeddingGenerator = embeddingGenerator });
public override Func<IServiceCollection, IServiceCollection>[] DependencyInjectionStoreRegistrationDelegates =>
[
services => services
.AddSingleton(RedisTestStore.JsonInstance.Database)
.AddRedisVectorStore()
];
public override Func<IServiceCollection, IServiceCollection>[] DependencyInjectionCollectionRegistrationDelegates =>
[
services => services
.AddSingleton(RedisTestStore.JsonInstance.Database)
.AddRedisJsonCollection<RecordWithAttributes>(this.CollectionName)
];
}
public new class RomOfFloatVectorFixture : EmbeddingGenerationTests<string>.RomOfFloatVectorFixture
{
public override TestStore TestStore => RedisTestStore.JsonInstance;
public override VectorStore CreateVectorStore(IEmbeddingGenerator? embeddingGenerator)
=> RedisTestStore.JsonInstance.GetVectorStore(new() { EmbeddingGenerator = embeddingGenerator });
public override Func<IServiceCollection, IServiceCollection>[] DependencyInjectionStoreRegistrationDelegates =>
[
services => services
.AddSingleton(RedisTestStore.JsonInstance.Database)
.AddRedisVectorStore()
];
public override Func<IServiceCollection, IServiceCollection>[] DependencyInjectionCollectionRegistrationDelegates =>
[
services => services
.AddSingleton(RedisTestStore.JsonInstance.Database)
.AddRedisJsonCollection<RecordWithAttributes>(this.CollectionName)
];
}
}
@@ -0,0 +1,17 @@
// Copyright (c) Microsoft. All rights reserved.
using Redis.ConformanceTests.Support;
using VectorData.ConformanceTests;
using VectorData.ConformanceTests.Support;
using Xunit;
namespace Redis.ConformanceTests;
public class RedisJsonIndexKindTests(RedisJsonIndexKindTests.Fixture fixture)
: IndexKindTests<string>(fixture), IClassFixture<RedisJsonIndexKindTests.Fixture>
{
public new class Fixture() : IndexKindTests<string>.Fixture
{
public override TestStore TestStore => RedisTestStore.JsonInstance;
}
}
@@ -0,0 +1,121 @@
// Copyright (c) Microsoft. All rights reserved.
using System.Text.Json;
using Microsoft.Extensions.VectorData;
using Microsoft.SemanticKernel.Connectors.Redis;
using Redis.ConformanceTests.Support;
using StackExchange.Redis;
using VectorData.ConformanceTests.Support;
using VectorData.ConformanceTests.Xunit;
using Xunit;
namespace Redis.ConformanceTests;
public sealed class RedisJsonOptionsTests(RedisJsonOptionsTests.Fixture fixture)
: IClassFixture<RedisJsonOptionsTests.Fixture>
{
[ConditionalFact]
public async Task Json_collection_with_prefix_and_nested_address_roundtrips()
{
var store = (RedisTestStore)fixture.TestStore;
var collectionName = fixture.TestStore.AdjustCollectionName("jsonoptions");
var options = new RedisJsonCollectionOptions { PrefixCollectionNameToKeyNames = true };
using var collection = new RedisJsonCollection<string, RedisJsonHotel>(store.Database, collectionName, options);
await collection.EnsureCollectionExistsAsync();
try
{
var record = new RedisJsonHotel
{
HotelId = "hotel-1",
HotelName = "Test Hotel",
ParkingIncluded = true,
Address = new RedisAddress { City = "Seattle", Country = "USA" },
DescriptionEmbedding = new([30f, 31f, 32f, 33f])
};
await collection.UpsertAsync(record);
var fetched = await collection.GetAsync(record.HotelId, new() { IncludeVectors = true });
Assert.NotNull(fetched);
Assert.Equal(record.HotelId, fetched!.HotelId);
Assert.Equal(record.HotelName, fetched.HotelName);
Assert.Equal(record.ParkingIncluded, fetched.ParkingIncluded);
Assert.NotNull(fetched.Address);
Assert.Equal(record.Address.City, fetched.Address.City);
Assert.Equal(record.Address.Country, fetched.Address.Country);
Assert.Equal(record.DescriptionEmbedding.ToArray(), fetched.DescriptionEmbedding.ToArray());
}
finally
{
await collection.EnsureCollectionDeletedAsync();
}
}
[ConditionalFact]
public async Task Json_collection_get_throws_for_invalid_schema()
{
var store = (RedisTestStore)fixture.TestStore;
var collectionName = fixture.TestStore.AdjustCollectionName("jsoninvalidschema");
var options = new RedisJsonCollectionOptions { PrefixCollectionNameToKeyNames = true };
using var collection = new RedisJsonCollection<string, RedisJsonHotel>(store.Database, collectionName, options);
await collection.EnsureCollectionExistsAsync();
try
{
var invalidDocument = new
{
HotelId = "another-id",
HotelName = "Invalid Hotel",
ParkingIncluded = false,
DescriptionEmbedding = new[] { 30f, 31f, 32f, 33f },
Address = new { City = "Seattle", Country = "USA" }
};
var key = (RedisKey)$"{collectionName}:invalid";
var json = JsonSerializer.Serialize(invalidDocument);
await store.Database.ExecuteAsync("JSON.SET", key, "$", json);
await Assert.ThrowsAsync<InvalidOperationException>(async () =>
await collection.GetAsync("invalid", new() { IncludeVectors = true }));
}
finally
{
await collection.EnsureCollectionDeletedAsync();
}
}
public sealed class Fixture : VectorStoreFixture
{
public override TestStore TestStore => RedisTestStore.JsonInstance;
}
private sealed class RedisJsonHotel
{
[VectorStoreKey]
public string HotelId { get; set; } = string.Empty;
[VectorStoreData(IsIndexed = true)]
public string HotelName { get; set; } = string.Empty;
[VectorStoreData(StorageName = "parking_is_included")]
public bool ParkingIncluded { get; set; }
[VectorStoreData]
public RedisAddress Address { get; set; } = new();
[VectorStoreVector(4)]
public ReadOnlyMemory<float> DescriptionEmbedding { get; set; }
}
private sealed class RedisAddress
{
public string City { get; set; } = string.Empty;
public string Country { get; set; } = string.Empty;
}
}
@@ -0,0 +1,14 @@
// Copyright (c) Microsoft. All rights reserved.
using VectorData.ConformanceTests;
namespace Redis.ConformanceTests;
public class RedisTestSuiteImplementationTests : TestSuiteImplementationTests
{
protected override ICollection<Type> IgnoredTestBases { get; } =
[
// Hybrid search not supported
typeof(HybridSearchTests<>)
];
}
@@ -0,0 +1,10 @@
// Copyright (c) Microsoft. All rights reserved.
using VectorData.ConformanceTests.Support;
namespace Redis.ConformanceTests.Support;
public class RedisFixture : VectorStoreFixture
{
public override TestStore TestStore => RedisTestStore.JsonInstance;
}
@@ -0,0 +1,10 @@
// Copyright (c) Microsoft. All rights reserved.
using VectorData.ConformanceTests.Support;
namespace Redis.ConformanceTests.Support;
public class RedisHashSetFixture : VectorStoreFixture
{
public override TestStore TestStore => RedisTestStore.HashSetInstance;
}
@@ -0,0 +1,10 @@
// Copyright (c) Microsoft. All rights reserved.
using VectorData.ConformanceTests.Support;
namespace Redis.ConformanceTests.Support;
public class RedisJsonFixture : VectorStoreFixture
{
public override TestStore TestStore => RedisTestStore.JsonInstance;
}
@@ -0,0 +1,43 @@
// Copyright (c) Microsoft. All rights reserved.
using Microsoft.SemanticKernel.Connectors.Redis;
using StackExchange.Redis;
using Testcontainers.Redis;
using VectorData.ConformanceTests.Support;
namespace Redis.ConformanceTests.Support;
#pragma warning restore CA2213 // Disposable fields should be disposed
internal sealed class RedisTestStore : TestStore
{
public static RedisTestStore JsonInstance { get; } = new(RedisStorageType.Json);
public static RedisTestStore HashSetInstance { get; } = new(RedisStorageType.HashSet);
private readonly RedisContainer _container = new RedisBuilder()
.WithImage("redis/redis-stack")
.WithPortBinding(6379, assignRandomHostPort: true)
.WithPortBinding(8001, assignRandomHostPort: true)
.Build();
private readonly RedisStorageType _storageType;
private IDatabase? _database;
private RedisTestStore(RedisStorageType storageType) => this._storageType = storageType;
public IDatabase Database => this._database ?? throw new InvalidOperationException("Not initialized");
public RedisVectorStore GetVectorStore(RedisVectorStoreOptions options)
=> new(this.Database, options);
protected override async Task StartAsync()
{
await this._container.StartAsync();
var redis = await ConnectionMultiplexer.ConnectAsync($"{this._container.Hostname}:{this._container.GetMappedPublicPort(6379)},connectTimeout=60000,connectRetry=5");
this._database = redis.GetDatabase();
this.DefaultVectorStore = new RedisVectorStore(this._database, new() { StorageType = this._storageType });
}
protected override Task StopAsync()
=> this._container.StopAsync();
}
@@ -0,0 +1,47 @@
// Copyright (c) Microsoft. All rights reserved.
using Redis.ConformanceTests.Support;
using VectorData.ConformanceTests.Support;
using VectorData.ConformanceTests.TypeTests;
using Xunit;
namespace Redis.ConformanceTests.TypeTests;
public class RedisHashSetDataTypeTests(RedisHashSetDataTypeTests.Fixture fixture)
: DataTypeTests<string, DataTypeTests<string>.DefaultRecord>(fixture), IClassFixture<RedisHashSetDataTypeTests.Fixture>
{
public override Task Bool() => Task.CompletedTask;
public override Task Decimal() => Task.CompletedTask;
public override Task DateTime() => Task.CompletedTask;
public override Task DateTimeOffset() => Task.CompletedTask;
public override Task DateOnly() => Task.CompletedTask;
public override Task TimeOnly() => Task.CompletedTask;
public override Task String_array()
=> this.Test<string[]>(
"StringArray",
["foo", "bar"],
["foo", "baz"],
isFilterable: false);
public new class Fixture : DataTypeTests<string, DataTypeTests<string>.DefaultRecord>.Fixture
{
public override TestStore TestStore => RedisTestStore.JsonInstance;
public override bool IsNullSupported => false;
public override bool IsNullFilteringSupported => false;
public override Type[] UnsupportedDefaultTypes { get; } =
[
typeof(bool),
typeof(decimal),
typeof(Guid),
typeof(DateTime),
typeof(DateTimeOffset),
#if NET
typeof(DateOnly),
typeof(TimeOnly)
#endif
];
}
}
@@ -0,0 +1,41 @@
// Copyright (c) Microsoft. All rights reserved.
using Microsoft.Extensions.AI;
using Redis.ConformanceTests.Support;
using VectorData.ConformanceTests.Support;
using VectorData.ConformanceTests.TypeTests;
using VectorData.ConformanceTests.Xunit;
using Xunit;
#pragma warning disable CA2000 // Dispose objects before losing scope
namespace Redis.ConformanceTests.TypeTests;
public class RedisHashSetEmbeddingTypeTests(RedisHashSetEmbeddingTypeTests.Fixture fixture)
: EmbeddingTypeTests<string>(fixture), IClassFixture<RedisHashSetEmbeddingTypeTests.Fixture>
{
[ConditionalFact]
public virtual Task ReadOnlyMemory_of_double()
=> this.Test<ReadOnlyMemory<double>>(
new ReadOnlyMemory<double>([1d, 2d, 3d]),
new ReadOnlyMemoryEmbeddingGenerator<double>([1d, 2d, 3d]),
vectorEqualityAsserter: (e, a) => Assert.Equal(e.Span.ToArray(), a.Span.ToArray()));
[ConditionalFact]
public virtual Task Embedding_of_double()
=> this.Test<Embedding<double>>(
new Embedding<double>(new ReadOnlyMemory<double>([1, 2, 3])),
new ReadOnlyMemoryEmbeddingGenerator<double>([1, 2, 3]),
vectorEqualityAsserter: (e, a) => Assert.Equal(e.Vector.Span.ToArray(), a.Vector.Span.ToArray()));
[ConditionalFact]
public virtual Task Array_of_double()
=> this.Test<double[]>(
[1, 2, 3],
new ReadOnlyMemoryEmbeddingGenerator<double>([1, 2, 3]));
public new class Fixture : EmbeddingTypeTests<string>.Fixture
{
public override TestStore TestStore => RedisTestStore.HashSetInstance;
}
}
@@ -0,0 +1,32 @@
// Copyright (c) Microsoft. All rights reserved.
using Microsoft.Extensions.VectorData;
using Redis.ConformanceTests.Support;
using VectorData.ConformanceTests.Support;
using VectorData.ConformanceTests.TypeTests;
using VectorData.ConformanceTests.Xunit;
using Xunit;
namespace Redis.ConformanceTests.TypeTests;
public class RedisHashSetKeyTypeTests(RedisHashSetKeyTypeTests.Fixture fixture)
: KeyTypeTests(fixture), IClassFixture<RedisHashSetKeyTypeTests.Fixture>
{
[ConditionalFact]
public virtual Task String() => this.Test<string>("foo", "bar");
public new class Fixture : KeyTypeTests.Fixture
{
private int _collectionCounter;
public override TestStore TestStore => RedisTestStore.HashSetInstance;
// Redis doesn't seem to reliably delete the collection: when running multiple tests that delete and recreate the collection with different key types,
// we seem to get key values from the previous collection despite having deleted and recreated it. So we uniquify the collection name instead.
public override VectorStoreCollection<TKey, Record<TKey>> CreateCollection<TKey>(bool? withAutoGeneration)
=> this.TestStore.DefaultVectorStore.GetCollection<TKey, Record<TKey>>(this.CollectionName + (++this._collectionCounter), this.CreateRecordDefinition<TKey>(withAutoGeneration));
public override VectorStoreCollection<object, Dictionary<string, object?>> CreateDynamicCollection<TKey>(bool withAutoGeneration)
=> this.TestStore.DefaultVectorStore.GetDynamicCollection(this.CollectionName + (++this._collectionCounter), this.CreateRecordDefinition<TKey>(withAutoGeneration));
}
}
@@ -0,0 +1,40 @@
// Copyright (c) Microsoft. All rights reserved.
using Redis.ConformanceTests.Support;
using VectorData.ConformanceTests.Support;
using VectorData.ConformanceTests.TypeTests;
using Xunit;
namespace Redis.ConformanceTests.TypeTests;
public class RedisJsonDataTypeTests(RedisJsonDataTypeTests.Fixture fixture)
: DataTypeTests<string, DataTypeTests<string>.DefaultRecord>(fixture), IClassFixture<RedisJsonDataTypeTests.Fixture>
{
public override Task String_array()
=> this.Test<string[]>(
"StringArray",
["foo", "bar"],
["foo", "baz"],
isFilterable: false);
public new class Fixture : DataTypeTests<string, DataTypeTests<string>.DefaultRecord>.Fixture
{
public override TestStore TestStore => RedisTestStore.JsonInstance;
public override bool IsNullSupported => false;
public override bool IsNullFilteringSupported => false;
public override Type[] UnsupportedDefaultTypes { get; } =
[
typeof(bool),
typeof(decimal),
typeof(Guid),
typeof(DateTime),
typeof(DateTimeOffset),
#if NET
typeof(DateOnly),
typeof(TimeOnly)
#endif
];
}
}
@@ -0,0 +1,41 @@
// Copyright (c) Microsoft. All rights reserved.
using Microsoft.Extensions.AI;
using Redis.ConformanceTests.Support;
using VectorData.ConformanceTests.Support;
using VectorData.ConformanceTests.TypeTests;
using VectorData.ConformanceTests.Xunit;
using Xunit;
#pragma warning disable CA2000 // Dispose objects before losing scope
namespace Redis.ConformanceTests.TypeTests;
public class RedisJsonEmbeddingTypeTests(RedisJsonEmbeddingTypeTests.Fixture fixture)
: EmbeddingTypeTests<string>(fixture), IClassFixture<RedisJsonEmbeddingTypeTests.Fixture>
{
[ConditionalFact]
public virtual Task ReadOnlyMemory_of_double()
=> this.Test<ReadOnlyMemory<double>>(
new ReadOnlyMemory<double>([1d, 2d, 3d]),
new ReadOnlyMemoryEmbeddingGenerator<double>([1d, 2d, 3d]),
vectorEqualityAsserter: (e, a) => Assert.Equal(e.Span.ToArray(), a.Span.ToArray()));
[ConditionalFact]
public virtual Task Embedding_of_double()
=> this.Test<Embedding<double>>(
new Embedding<double>(new ReadOnlyMemory<double>([1, 2, 3])),
new ReadOnlyMemoryEmbeddingGenerator<double>([1, 2, 3]),
vectorEqualityAsserter: (e, a) => Assert.Equal(e.Vector.Span.ToArray(), a.Vector.Span.ToArray()));
[ConditionalFact]
public virtual Task Array_of_double()
=> this.Test<double[]>(
[1, 2, 3],
new ReadOnlyMemoryEmbeddingGenerator<double>([1, 2, 3]));
public new class Fixture : EmbeddingTypeTests<string>.Fixture
{
public override TestStore TestStore => RedisTestStore.JsonInstance;
}
}
@@ -0,0 +1,32 @@
// Copyright (c) Microsoft. All rights reserved.
using Microsoft.Extensions.VectorData;
using Redis.ConformanceTests.Support;
using VectorData.ConformanceTests.Support;
using VectorData.ConformanceTests.TypeTests;
using VectorData.ConformanceTests.Xunit;
using Xunit;
namespace Redis.ConformanceTests.TypeTests;
public class RedisJsonKeyTypeTests(RedisJsonKeyTypeTests.Fixture fixture)
: KeyTypeTests(fixture), IClassFixture<RedisJsonKeyTypeTests.Fixture>
{
[ConditionalFact]
public virtual Task String() => this.Test<string>("foo", "bar");
public new class Fixture : KeyTypeTests.Fixture
{
private int _collectionCounter;
public override TestStore TestStore => RedisTestStore.JsonInstance;
// Redis doesn't seem to reliably delete the collection: when running multiple tests that delete and recreate the collection with different key types,
// we seem to get key values from the previous collection despite having deleted and recreated it. So we uniquify the collection name instead.
public override VectorStoreCollection<TKey, Record<TKey>> CreateCollection<TKey>(bool? withAutoGeneration)
=> this.TestStore.DefaultVectorStore.GetCollection<TKey, Record<TKey>>(this.CollectionName + (++this._collectionCounter), this.CreateRecordDefinition<TKey>(withAutoGeneration));
public override VectorStoreCollection<object, Dictionary<string, object?>> CreateDynamicCollection<TKey>(bool withAutoGeneration)
=> this.TestStore.DefaultVectorStore.GetDynamicCollection(this.CollectionName + (++this._collectionCounter), this.CreateRecordDefinition<TKey>(withAutoGeneration));
}
}