erickguan commented on code in PR #6292:
URL: https://github.com/apache/opendal/pull/6292#discussion_r2148739427


##########
core/src/services/redis/core.rs:
##########
@@ -200,6 +200,27 @@ impl RedisCore {
         let _: () = conn.del(key).await.map_err(format_redis_error)?;
         Ok(())
     }
+
+    pub async fn scan(
+        &self,
+        pattern: &str,
+        cursor: u64,
+        count: Option<usize>,
+    ) -> Result<(u64, Vec<String>)> {
+        let mut conn = self.conn().await?;
+
+        let mut cmd = redis::cmd("SCAN");
+
+        cmd.arg(cursor).arg("MATCH").arg(pattern);

Review Comment:
   ```suggestion
           // not using `Cmd::cursor_arg` because Lister will track pages 
(cursors)
           cmd.arg(cursor).arg("MATCH").arg(pattern);
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to