diff --git a/src/RedisHelper.cs b/src/RedisHelper.cs index 36c8040..c98cc95 100644 --- a/src/RedisHelper.cs +++ b/src/RedisHelper.cs @@ -706,6 +706,42 @@ public static long ZRemRangeByLex(string key, string min, string max) => /// public static long ZLexCount(string key, string min, string max) => Instance.ZLexCount(key, min, max); + + /// + /// [redis-server 5.0.0] 删除并返回有序集合key中的最多count个具有最高得分的成员。如未指定,count的默认值为1。指定一个大于有序集合的基数的count不会产生错误。 当返回多个元素时候,得分最高的元素将是第一个元素,然后是分数较低的元素。 + /// + /// 不含prefix前辍 + /// 数量 + /// + public static (string member, decimal score)[] ZPopMax(string key, long count) => + Instance.ZPopMax(key, count); + + /// + /// [redis-server 5.0.0] 删除并返回有序集合key中的最多count个具有最高得分的成员。如未指定,count的默认值为1。指定一个大于有序集合的基数的count不会产生错误。 当返回多个元素时候,得分最高的元素将是第一个元素,然后是分数较低的元素。 + /// + /// 不含prefix前辍 + /// 数量 + /// + public static (T member, decimal score)[] ZPopMax(string key, long count) => + Instance.ZPopMax(key, count); + + /// + /// [redis-server 5.0.0] 删除并返回有序集合key中的最多count个具有最低得分的成员。如未指定,count的默认值为1。指定一个大于有序集合的基数的count不会产生错误。 当返回多个元素时候,得分最低的元素将是第一个元素,然后是分数较高的元素。 + /// + /// 不含prefix前辍 + /// 数量 + /// + public static (string member, decimal score)[] ZPopMin(string key, long count) => + Instance.ZPopMin(key, count); + + /// + /// [redis-server 5.0.0] 删除并返回有序集合key中的最多count个具有最低得分的成员。如未指定,count的默认值为1。指定一个大于有序集合的基数的count不会产生错误。 当返回多个元素时候,得分最低的元素将是第一个元素,然后是分数较高的元素。 + /// + /// 不含prefix前辍 + /// 数量 + /// + public static (T member, decimal score)[] ZPopMin(string key, long count) => + Instance.ZPopMin(key, count); #endregion #region Set @@ -1890,7 +1926,7 @@ public static (T member, decimal dist, decimal longitude, decimal latitude)[] Ge Instance.GeoRadiusByMemberWithDistAndCoord(key, member, radius, unit, count, sorting); #endregion - /// + /// /// 开启分布式锁,若超时返回null /// /// 锁名称 diff --git a/src/RedisHelperAsync.cs b/src/RedisHelperAsync.cs index 15a9e95..fdf0a7e 100644 --- a/src/RedisHelperAsync.cs +++ b/src/RedisHelperAsync.cs @@ -1080,6 +1080,42 @@ public static Task ZLexCountAsync(string key, string min, string max) => /// public static Task> HScanAsync(string key, long cursor, string pattern = null, long? count = null) => Instance.HScanAsync(key, cursor, pattern, count); + + /// + /// [redis-server 5.0.0] 删除并返回有序集合key中的最多count个具有最高得分的成员。如未指定,count的默认值为1。指定一个大于有序集合的基数的count不会产生错误。 当返回多个元素时候,得分最高的元素将是第一个元素,然后是分数较低的元素。 + /// + /// 不含prefix前辍 + /// 数量 + /// + public static Task<(string member, decimal score)[]> ZPopMaxAsync(string key, long count) => + Instance.ZPopMaxAsync(key, count); + + /// + /// [redis-server 5.0.0] 删除并返回有序集合key中的最多count个具有最高得分的成员。如未指定,count的默认值为1。指定一个大于有序集合的基数的count不会产生错误。 当返回多个元素时候,得分最高的元素将是第一个元素,然后是分数较低的元素。 + /// + /// 不含prefix前辍 + /// 数量 + /// + public static Task<(T member, decimal score)[]> ZPopMaxAsync(string key, long count) => + Instance.ZPopMaxAsync(key, count); + + /// + /// [redis-server 5.0.0] 删除并返回有序集合key中的最多count个具有最低得分的成员。如未指定,count的默认值为1。指定一个大于有序集合的基数的count不会产生错误。 当返回多个元素时候,得分最低的元素将是第一个元素,然后是分数较高的元素。 + /// + /// 不含prefix前辍 + /// 数量 + /// + public static Task<(string member, decimal score)[]> ZPopMinAsync(string key, long count) => + Instance.ZPopMinAsync(key, count); + + /// + /// [redis-server 5.0.0] 删除并返回有序集合key中的最多count个具有最低得分的成员。如未指定,count的默认值为1。指定一个大于有序集合的基数的count不会产生错误。 当返回多个元素时候,得分最低的元素将是第一个元素,然后是分数较高的元素。 + /// + /// 不含prefix前辍 + /// 数量 + /// + public static Task<(T member, decimal score)[]> ZPopMinAsync(string key, long count) => + Instance.ZPopMinAsync(key, count); #endregion #region String