Skip to content

Commit 130c899

Browse files
committed
refactor(set): rename batch set commands to match GLIDE naming
Signed-off-by: currantw <taylor.curran@improving.com>
1 parent 39a5496 commit 130c899

3 files changed

Lines changed: 84 additions & 84 deletions

File tree

sources/Valkey.Glide/Pipeline/BaseBatch.SetCommands.cs

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ public abstract partial class BaseBatch<T>
2424
/// <inheritdoc cref="IBatchSetCommands.SetMembers(ValkeyKey)" />
2525
public T SetMembers(ValkeyKey key) => AddCmd(SetMembersAsync(key));
2626

27-
/// <inheritdoc cref="IBatchSetCommands.SetLength(ValkeyKey)" />
28-
public T SetLength(ValkeyKey key) => AddCmd(SetLengthAsync(key));
27+
/// <inheritdoc cref="IBatchSetCommands.SetCard(ValkeyKey)" />
28+
public T SetCard(ValkeyKey key) => AddCmd(SetLengthAsync(key));
2929

30-
/// <inheritdoc cref="IBatchSetCommands.SetIntersectionLength(IEnumerable{ValkeyKey}, long)" />
31-
public T SetIntersectionLength(IEnumerable<ValkeyKey> keys, long limit = 0) => AddCmd(SetIntersectionLengthAsync([.. keys], limit));
30+
/// <inheritdoc cref="IBatchSetCommands.SetInterCard(IEnumerable{ValkeyKey}, long)" />
31+
public T SetInterCard(IEnumerable<ValkeyKey> keys, long limit = 0) => AddCmd(SetIntersectionLengthAsync([.. keys], limit));
3232

3333
/// <inheritdoc cref="IBatchSetCommands.SetPop(ValkeyKey)" />
3434
public T SetPop(ValkeyKey key) => AddCmd(SetPopAsync(key));
@@ -42,41 +42,41 @@ public abstract partial class BaseBatch<T>
4242
/// <inheritdoc cref="IBatchSetCommands.SetUnion(IEnumerable{ValkeyKey})" />
4343
public T SetUnion(IEnumerable<ValkeyKey> keys) => AddCmd(SetUnionAsync([.. keys]));
4444

45-
/// <inheritdoc cref="IBatchSetCommands.SetIntersect(ValkeyKey, ValkeyKey)" />
46-
public T SetIntersect(ValkeyKey first, ValkeyKey second) => AddCmd(SetIntersectAsync([first, second]));
45+
/// <inheritdoc cref="IBatchSetCommands.SetInter(ValkeyKey, ValkeyKey)" />
46+
public T SetInter(ValkeyKey first, ValkeyKey second) => AddCmd(SetIntersectAsync([first, second]));
4747

48-
/// <inheritdoc cref="IBatchSetCommands.SetIntersect(IEnumerable{ValkeyKey})" />
49-
public T SetIntersect(IEnumerable<ValkeyKey> keys) => AddCmd(SetIntersectAsync([.. keys]));
48+
/// <inheritdoc cref="IBatchSetCommands.SetInter(IEnumerable{ValkeyKey})" />
49+
public T SetInter(IEnumerable<ValkeyKey> keys) => AddCmd(SetIntersectAsync([.. keys]));
5050

51-
/// <inheritdoc cref="IBatchSetCommands.SetDifference(ValkeyKey, ValkeyKey)" />
52-
public T SetDifference(ValkeyKey first, ValkeyKey second) => AddCmd(SetDifferenceAsync([first, second]));
51+
/// <inheritdoc cref="IBatchSetCommands.SetDiff(ValkeyKey, ValkeyKey)" />
52+
public T SetDiff(ValkeyKey first, ValkeyKey second) => AddCmd(SetDifferenceAsync([first, second]));
5353

54-
/// <inheritdoc cref="IBatchSetCommands.SetDifference(IEnumerable{ValkeyKey})" />
55-
public T SetDifference(IEnumerable<ValkeyKey> keys) => AddCmd(SetDifferenceAsync([.. keys]));
54+
/// <inheritdoc cref="IBatchSetCommands.SetDiff(IEnumerable{ValkeyKey})" />
55+
public T SetDiff(IEnumerable<ValkeyKey> keys) => AddCmd(SetDifferenceAsync([.. keys]));
5656

5757
/// <inheritdoc cref="IBatchSetCommands.SetUnionStore(ValkeyKey, ValkeyKey, ValkeyKey)" />
5858
public T SetUnionStore(ValkeyKey destination, ValkeyKey first, ValkeyKey second) => AddCmd(SetUnionStoreAsync(destination, [first, second]));
5959

6060
/// <inheritdoc cref="IBatchSetCommands.SetUnionStore(ValkeyKey, IEnumerable{ValkeyKey})" />
6161
public T SetUnionStore(ValkeyKey destination, IEnumerable<ValkeyKey> keys) => AddCmd(SetUnionStoreAsync(destination, [.. keys]));
6262

63-
/// <inheritdoc cref="IBatchSetCommands.SetIntersectStore(ValkeyKey, ValkeyKey, ValkeyKey)" />
64-
public T SetIntersectStore(ValkeyKey destination, ValkeyKey first, ValkeyKey second) => AddCmd(SetIntersectStoreAsync(destination, [first, second]));
63+
/// <inheritdoc cref="IBatchSetCommands.SetInterStore(ValkeyKey, ValkeyKey, ValkeyKey)" />
64+
public T SetInterStore(ValkeyKey destination, ValkeyKey first, ValkeyKey second) => AddCmd(SetIntersectStoreAsync(destination, [first, second]));
6565

66-
/// <inheritdoc cref="IBatchSetCommands.SetIntersectStore(ValkeyKey, IEnumerable{ValkeyKey})" />
67-
public T SetIntersectStore(ValkeyKey destination, IEnumerable<ValkeyKey> keys) => AddCmd(SetIntersectStoreAsync(destination, [.. keys]));
66+
/// <inheritdoc cref="IBatchSetCommands.SetInterStore(ValkeyKey, IEnumerable{ValkeyKey})" />
67+
public T SetInterStore(ValkeyKey destination, IEnumerable<ValkeyKey> keys) => AddCmd(SetIntersectStoreAsync(destination, [.. keys]));
6868

69-
/// <inheritdoc cref="IBatchSetCommands.SetDifferenceStore(ValkeyKey, ValkeyKey, ValkeyKey)" />
70-
public T SetDifferenceStore(ValkeyKey destination, ValkeyKey first, ValkeyKey second) => AddCmd(SetDifferenceStoreAsync(destination, [first, second]));
69+
/// <inheritdoc cref="IBatchSetCommands.SetDiffStore(ValkeyKey, ValkeyKey, ValkeyKey)" />
70+
public T SetDiffStore(ValkeyKey destination, ValkeyKey first, ValkeyKey second) => AddCmd(SetDifferenceStoreAsync(destination, [first, second]));
7171

72-
/// <inheritdoc cref="IBatchSetCommands.SetDifferenceStore(ValkeyKey, IEnumerable{ValkeyKey})" />
73-
public T SetDifferenceStore(ValkeyKey destination, IEnumerable<ValkeyKey> keys) => AddCmd(SetDifferenceStoreAsync(destination, [.. keys]));
72+
/// <inheritdoc cref="IBatchSetCommands.SetDiffStore(ValkeyKey, IEnumerable{ValkeyKey})" />
73+
public T SetDiffStore(ValkeyKey destination, IEnumerable<ValkeyKey> keys) => AddCmd(SetDifferenceStoreAsync(destination, [.. keys]));
7474

75-
/// <inheritdoc cref="IBatchSetCommands.SetContains(ValkeyKey, ValkeyValue)" />
76-
public T SetContains(ValkeyKey key, ValkeyValue value) => AddCmd(SetContainsAsync(key, value));
75+
/// <inheritdoc cref="IBatchSetCommands.SetIsMember(ValkeyKey, ValkeyValue)" />
76+
public T SetIsMember(ValkeyKey key, ValkeyValue value) => AddCmd(SetContainsAsync(key, value));
7777

78-
/// <inheritdoc cref="IBatchSetCommands.SetContains(ValkeyKey, IEnumerable{ValkeyValue})" />
79-
public T SetContains(ValkeyKey key, IEnumerable<ValkeyValue> values) => AddCmd(SetContainsAsync(key, [.. values]));
78+
/// <inheritdoc cref="IBatchSetCommands.SetIsMember(ValkeyKey, IEnumerable{ValkeyValue})" />
79+
public T SetIsMember(ValkeyKey key, IEnumerable<ValkeyValue> values) => AddCmd(SetContainsAsync(key, [.. values]));
8080

8181
/// <inheritdoc cref="IBatchSetCommands.SetRandomMember(ValkeyKey)" />
8282
public T SetRandomMember(ValkeyKey key) => AddCmd(SetRandomMemberAsync(key));
@@ -96,24 +96,24 @@ public abstract partial class BaseBatch<T>
9696
IBatch IBatchSetCommands.SetRemove(ValkeyKey key, ValkeyValue value) => SetRemove(key, value);
9797
IBatch IBatchSetCommands.SetRemove(ValkeyKey key, IEnumerable<ValkeyValue> values) => SetRemove(key, values);
9898
IBatch IBatchSetCommands.SetMembers(ValkeyKey key) => SetMembers(key);
99-
IBatch IBatchSetCommands.SetLength(ValkeyKey key) => SetLength(key);
100-
IBatch IBatchSetCommands.SetIntersectionLength(IEnumerable<ValkeyKey> keys, long limit) => SetIntersectionLength(keys, limit);
99+
IBatch IBatchSetCommands.SetCard(ValkeyKey key) => SetCard(key);
100+
IBatch IBatchSetCommands.SetInterCard(IEnumerable<ValkeyKey> keys, long limit) => SetInterCard(keys, limit);
101101
IBatch IBatchSetCommands.SetPop(ValkeyKey key) => SetPop(key);
102102
IBatch IBatchSetCommands.SetPop(ValkeyKey key, long count) => SetPop(key, count);
103103
IBatch IBatchSetCommands.SetUnion(ValkeyKey first, ValkeyKey second) => SetUnion(first, second);
104104
IBatch IBatchSetCommands.SetUnion(IEnumerable<ValkeyKey> keys) => SetUnion(keys);
105-
IBatch IBatchSetCommands.SetIntersect(ValkeyKey first, ValkeyKey second) => SetIntersect(first, second);
106-
IBatch IBatchSetCommands.SetIntersect(IEnumerable<ValkeyKey> keys) => SetIntersect(keys);
107-
IBatch IBatchSetCommands.SetDifference(ValkeyKey first, ValkeyKey second) => SetDifference(first, second);
108-
IBatch IBatchSetCommands.SetDifference(IEnumerable<ValkeyKey> keys) => SetDifference(keys);
105+
IBatch IBatchSetCommands.SetInter(ValkeyKey first, ValkeyKey second) => SetInter(first, second);
106+
IBatch IBatchSetCommands.SetInter(IEnumerable<ValkeyKey> keys) => SetInter(keys);
107+
IBatch IBatchSetCommands.SetDiff(ValkeyKey first, ValkeyKey second) => SetDiff(first, second);
108+
IBatch IBatchSetCommands.SetDiff(IEnumerable<ValkeyKey> keys) => SetDiff(keys);
109109
IBatch IBatchSetCommands.SetUnionStore(ValkeyKey destination, ValkeyKey first, ValkeyKey second) => SetUnionStore(destination, first, second);
110110
IBatch IBatchSetCommands.SetUnionStore(ValkeyKey destination, IEnumerable<ValkeyKey> keys) => SetUnionStore(destination, keys);
111-
IBatch IBatchSetCommands.SetIntersectStore(ValkeyKey destination, ValkeyKey first, ValkeyKey second) => SetIntersectStore(destination, first, second);
112-
IBatch IBatchSetCommands.SetIntersectStore(ValkeyKey destination, IEnumerable<ValkeyKey> keys) => SetIntersectStore(destination, keys);
113-
IBatch IBatchSetCommands.SetDifferenceStore(ValkeyKey destination, ValkeyKey first, ValkeyKey second) => SetDifferenceStore(destination, first, second);
114-
IBatch IBatchSetCommands.SetDifferenceStore(ValkeyKey destination, IEnumerable<ValkeyKey> keys) => SetDifferenceStore(destination, keys);
115-
IBatch IBatchSetCommands.SetContains(ValkeyKey key, ValkeyValue value) => SetContains(key, value);
116-
IBatch IBatchSetCommands.SetContains(ValkeyKey key, IEnumerable<ValkeyValue> values) => SetContains(key, values);
111+
IBatch IBatchSetCommands.SetInterStore(ValkeyKey destination, ValkeyKey first, ValkeyKey second) => SetInterStore(destination, first, second);
112+
IBatch IBatchSetCommands.SetInterStore(ValkeyKey destination, IEnumerable<ValkeyKey> keys) => SetInterStore(destination, keys);
113+
IBatch IBatchSetCommands.SetDiffStore(ValkeyKey destination, ValkeyKey first, ValkeyKey second) => SetDiffStore(destination, first, second);
114+
IBatch IBatchSetCommands.SetDiffStore(ValkeyKey destination, IEnumerable<ValkeyKey> keys) => SetDiffStore(destination, keys);
115+
IBatch IBatchSetCommands.SetIsMember(ValkeyKey key, ValkeyValue value) => SetIsMember(key, value);
116+
IBatch IBatchSetCommands.SetIsMember(ValkeyKey key, IEnumerable<ValkeyValue> values) => SetIsMember(key, values);
117117
IBatch IBatchSetCommands.SetRandomMember(ValkeyKey key) => SetRandomMember(key);
118118
IBatch IBatchSetCommands.SetRandomMembers(ValkeyKey key, long count) => SetRandomMembers(key, count);
119119
IBatch IBatchSetCommands.SetMove(ValkeyKey source, ValkeyKey destination, ValkeyValue value) => SetMove(source, destination, value);

sources/Valkey.Glide/Pipeline/IBatchSetCommands.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ internal interface IBatchSetCommands
2828

2929
/// <inheritdoc cref="IBaseClient.SetCardAsync(ValkeyKey)" path="/*[not(self::remarks) and not(self::returns)]" />
3030
/// <returns>Command Response - <inheritdoc cref="IBaseClient.SetCardAsync(ValkeyKey)" /></returns>
31-
IBatch SetLength(ValkeyKey key);
31+
IBatch SetCard(ValkeyKey key);
3232

3333
/// <inheritdoc cref="IBaseClient.SetInterCardAsync(IEnumerable{ValkeyKey}, long)" path="/*[not(self::remarks) and not(self::returns)]" />
3434
/// <returns>Command Response - <inheritdoc cref="IBaseClient.SetInterCardAsync(IEnumerable{ValkeyKey}, long)" /></returns>
35-
IBatch SetIntersectionLength(IEnumerable<ValkeyKey> keys, long limit = 0);
35+
IBatch SetInterCard(IEnumerable<ValkeyKey> keys, long limit = 0);
3636

3737
/// <inheritdoc cref="ISetBaseCommands.SetPopAsync(ValkeyKey)" path="/*[not(self::remarks) and not(self::returns)]" />
3838
/// <returns>Command Response - <inheritdoc cref="ISetBaseCommands.SetPopAsync(ValkeyKey)" /></returns>
@@ -52,19 +52,19 @@ internal interface IBatchSetCommands
5252

5353
/// <inheritdoc cref="IBaseClient.SetInterAsync(IEnumerable{ValkeyKey})" path="/*[not(self::remarks) and not(self::returns)]" />
5454
/// <returns>Command Response - <inheritdoc cref="IBaseClient.SetInterAsync(IEnumerable{ValkeyKey})" /></returns>
55-
IBatch SetIntersect(ValkeyKey first, ValkeyKey second);
55+
IBatch SetInter(ValkeyKey first, ValkeyKey second);
5656

5757
/// <inheritdoc cref="IBaseClient.SetInterAsync(IEnumerable{ValkeyKey})" path="/*[not(self::remarks) and not(self::returns)]" />
5858
/// <returns>Command Response - <inheritdoc cref="IBaseClient.SetInterAsync(IEnumerable{ValkeyKey})" /></returns>
59-
IBatch SetIntersect(IEnumerable<ValkeyKey> keys);
59+
IBatch SetInter(IEnumerable<ValkeyKey> keys);
6060

6161
/// <inheritdoc cref="IBaseClient.SetDiffAsync(IEnumerable{ValkeyKey})" path="/*[not(self::remarks) and not(self::returns)]" />
6262
/// <returns>Command Response - <inheritdoc cref="IBaseClient.SetDiffAsync(IEnumerable{ValkeyKey})" /></returns>
63-
IBatch SetDifference(ValkeyKey first, ValkeyKey second);
63+
IBatch SetDiff(ValkeyKey first, ValkeyKey second);
6464

6565
/// <inheritdoc cref="IBaseClient.SetDiffAsync(IEnumerable{ValkeyKey})" path="/*[not(self::remarks) and not(self::returns)]" />
6666
/// <returns>Command Response - <inheritdoc cref="IBaseClient.SetDiffAsync(IEnumerable{ValkeyKey})" /></returns>
67-
IBatch SetDifference(IEnumerable<ValkeyKey> keys);
67+
IBatch SetDiff(IEnumerable<ValkeyKey> keys);
6868

6969
/// <inheritdoc cref="IBaseClient.SetUnionStoreAsync(ValkeyKey, IEnumerable{ValkeyKey})" path="/*[not(self::remarks) and not(self::returns)]" />
7070
/// <returns>Command Response - <inheritdoc cref="IBaseClient.SetUnionStoreAsync(ValkeyKey, IEnumerable{ValkeyKey})" /></returns>
@@ -76,27 +76,27 @@ internal interface IBatchSetCommands
7676

7777
/// <inheritdoc cref="IBaseClient.SetInterStoreAsync(ValkeyKey, IEnumerable{ValkeyKey})" path="/*[not(self::remarks) and not(self::returns)]" />
7878
/// <returns>Command Response - <inheritdoc cref="IBaseClient.SetInterStoreAsync(ValkeyKey, IEnumerable{ValkeyKey})" /></returns>
79-
IBatch SetIntersectStore(ValkeyKey destination, ValkeyKey first, ValkeyKey second);
79+
IBatch SetInterStore(ValkeyKey destination, ValkeyKey first, ValkeyKey second);
8080

8181
/// <inheritdoc cref="IBaseClient.SetInterStoreAsync(ValkeyKey, IEnumerable{ValkeyKey})" path="/*[not(self::remarks) and not(self::returns)]" />
8282
/// <returns>Command Response - <inheritdoc cref="IBaseClient.SetInterStoreAsync(ValkeyKey, IEnumerable{ValkeyKey})" /></returns>
83-
IBatch SetIntersectStore(ValkeyKey destination, IEnumerable<ValkeyKey> keys);
83+
IBatch SetInterStore(ValkeyKey destination, IEnumerable<ValkeyKey> keys);
8484

8585
/// <inheritdoc cref="IBaseClient.SetDiffStoreAsync(ValkeyKey, IEnumerable{ValkeyKey})" path="/*[not(self::remarks) and not(self::returns)]" />
8686
/// <returns>Command Response - <inheritdoc cref="IBaseClient.SetDiffStoreAsync(ValkeyKey, IEnumerable{ValkeyKey})" /></returns>
87-
IBatch SetDifferenceStore(ValkeyKey destination, ValkeyKey first, ValkeyKey second);
87+
IBatch SetDiffStore(ValkeyKey destination, ValkeyKey first, ValkeyKey second);
8888

8989
/// <inheritdoc cref="IBaseClient.SetDiffStoreAsync(ValkeyKey, IEnumerable{ValkeyKey})" path="/*[not(self::remarks) and not(self::returns)]" />
9090
/// <returns>Command Response - <inheritdoc cref="IBaseClient.SetDiffStoreAsync(ValkeyKey, IEnumerable{ValkeyKey})" /></returns>
91-
IBatch SetDifferenceStore(ValkeyKey destination, IEnumerable<ValkeyKey> keys);
91+
IBatch SetDiffStore(ValkeyKey destination, IEnumerable<ValkeyKey> keys);
9292

9393
/// <inheritdoc cref="IBaseClient.SetIsMemberAsync(ValkeyKey, ValkeyValue)" path="/*[not(self::remarks) and not(self::returns)]" />
9494
/// <returns>Command Response - <inheritdoc cref="IBaseClient.SetIsMemberAsync(ValkeyKey, ValkeyValue)" /></returns>
95-
IBatch SetContains(ValkeyKey key, ValkeyValue value);
95+
IBatch SetIsMember(ValkeyKey key, ValkeyValue value);
9696

9797
/// <inheritdoc cref="IBaseClient.SetIsMemberAsync(ValkeyKey, IEnumerable{ValkeyValue})" path="/*[not(self::remarks) and not(self::returns)]" />
9898
/// <returns>Command Response - <inheritdoc cref="IBaseClient.SetIsMemberAsync(ValkeyKey, IEnumerable{ValkeyValue})" /></returns>
99-
IBatch SetContains(ValkeyKey key, IEnumerable<ValkeyValue> values);
99+
IBatch SetIsMember(ValkeyKey key, IEnumerable<ValkeyValue> values);
100100

101101
/// <inheritdoc cref="ISetBaseCommands.SetRandomMemberAsync(ValkeyKey)" path="/*[not(self::remarks) and not(self::returns)]" />
102102
/// <returns>Command Response - <inheritdoc cref="ISetBaseCommands.SetRandomMemberAsync(ValkeyKey)" /></returns>

0 commit comments

Comments
 (0)