Skip to content

Commit 1cbe829

Browse files
committed
v0.3.7 fix: ZScore return type
1 parent 2ad3461 commit 1cbe829

File tree

3 files changed

+15
-18
lines changed

3 files changed

+15
-18
lines changed

src/FreeRedis/FreeRedis.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<AssemblyName>FreeRedis</AssemblyName>
66
<PackageId>FreeRedis</PackageId>
77
<RootNamespace>FreeRedis</RootNamespace>
8-
<Version>0.3.6</Version>
8+
<Version>0.3.7</Version>
99
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
1010
<PackageProjectUrl>https://github.com/2881099/FreeRedis</PackageProjectUrl>
1111
<Description>FreeRedis is .NET redis client, supports cluster, sentinel, master-slave, pipeline, transaction and connection pool.</Description>

src/FreeRedis/FreeRedis.xml

Lines changed: 12 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/FreeRedis/RedisClient/SortedSets.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public Task<ZMember[]> ZRevRangeByScoreWithScoresAsync(string key, string max, s
130130
public Task<long> ZRevRankAsync(string key, string member) => CallAsync("ZREVRANK".InputKey(key, member), rt => rt.ThrowOrValue<long>());
131131

132132
//ZSCAN key cursor [MATCH pattern] [COUNT count]
133-
public Task<decimal> ZScoreAsync(string key, string member) => CallAsync("ZSCORE".InputKey(key, member), rt => rt.ThrowOrValue<decimal>());
133+
public Task<decimal?> ZScoreAsync(string key, string member) => CallAsync("ZSCORE".InputKey(key, member), rt => rt.ThrowOrValue<decimal?>());
134134
public Task<long> ZUnionStoreAsync(string destination, string[] keys, int[] weights = null, ZAggregate? aggregate = null) => ZStoreAsync(false, destination, keys, weights, aggregate);
135135
Task<long> ZStoreAsync(bool inter, string destination, string[] keys, int[] weights, ZAggregate? aggregate) => CallAsync((inter ? "ZINTERSTORE" : "ZUNIONSTORE")
136136
.InputKey(destination, keys?.Length ?? 0)
@@ -260,7 +260,7 @@ public ZMember[] ZRevRangeByScoreWithScores(string key, string max, string min,
260260
public long ZRevRank(string key, string member) => Call("ZREVRANK".InputKey(key, member), rt => rt.ThrowOrValue<long>());
261261

262262
//ZSCAN key cursor [MATCH pattern] [COUNT count]
263-
public decimal ZScore(string key, string member) => Call("ZSCORE".InputKey(key, member), rt => rt.ThrowOrValue<decimal>());
263+
public decimal? ZScore(string key, string member) => Call("ZSCORE".InputKey(key, member), rt => rt.ThrowOrValue<decimal?>());
264264
public long ZUnionStore(string destination, string[] keys, int[] weights = null, ZAggregate? aggregate = null) => ZStore(false, destination, keys, weights, aggregate);
265265
long ZStore(bool inter, string destination, string[] keys, int[] weights, ZAggregate? aggregate) => Call((inter ? "ZINTERSTORE" : "ZUNIONSTORE")
266266
.InputKey(destination, keys?.Length ?? 0)

0 commit comments

Comments
 (0)