@@ -141,6 +141,7 @@ type Cmdable interface {
141
141
BitField (ctx context.Context , key string , args ... interface {}) * IntSliceCmd
142
142
143
143
Scan (ctx context.Context , cursor uint64 , match string , count int64 ) * ScanCmd
144
+ ScanType (ctx context.Context , cursor uint64 , match string , count int64 , keyType string ) * ScanCmd
144
145
SScan (ctx context.Context , key string , cursor uint64 , match string , count int64 ) * ScanCmd
145
146
HScan (ctx context.Context , key string , cursor uint64 , match string , count int64 ) * ScanCmd
146
147
ZScan (ctx context.Context , key string , cursor uint64 , match string , count int64 ) * ScanCmd
@@ -965,6 +966,22 @@ func (c cmdable) Scan(ctx context.Context, cursor uint64, match string, count in
965
966
return cmd
966
967
}
967
968
969
+ func (c cmdable ) ScanType (ctx context.Context , cursor uint64 , match string , count int64 , keyType string ) * ScanCmd {
970
+ args := []interface {}{"scan" , cursor }
971
+ if match != "" {
972
+ args = append (args , "match" , match )
973
+ }
974
+ if count > 0 {
975
+ args = append (args , "count" , count )
976
+ }
977
+ if keyType != "" {
978
+ args = append (args , "type" , keyType )
979
+ }
980
+ cmd := NewScanCmd (ctx , c , args ... )
981
+ _ = c (ctx , cmd )
982
+ return cmd
983
+ }
984
+
968
985
func (c cmdable ) SScan (ctx context.Context , key string , cursor uint64 , match string , count int64 ) * ScanCmd {
969
986
args := []interface {}{"sscan" , key , cursor }
970
987
if match != "" {
0 commit comments