@@ -141,6 +141,7 @@ type Cmdable interface {
141141 BitField (ctx context.Context , key string , args ... interface {}) * IntSliceCmd
142142
143143 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
144145 SScan (ctx context.Context , key string , cursor uint64 , match string , count int64 ) * ScanCmd
145146 HScan (ctx context.Context , key string , cursor uint64 , match string , count int64 ) * ScanCmd
146147 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
965966 return cmd
966967}
967968
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+
968985func (c cmdable ) SScan (ctx context.Context , key string , cursor uint64 , match string , count int64 ) * ScanCmd {
969986 args := []interface {}{"sscan" , key , cursor }
970987 if match != "" {
0 commit comments