scan method

Future<ScanResult> scan(
  1. int cursor, {
  2. String? pattern,
  3. int? count,
})

The SCAN command and the closely related commands SSCAN, HSCAN and ZSCAN are used in order to incrementally iterate over a collection of elements.

See https://redis.io/commands/scan for more detailed documentation.

Implementation

Future<ScanResult> scan(int cursor, {String? pattern, int? count}) async {
  final result = (await tier1.scan(cursor, pattern: pattern, count: count)).toArray().payload;
  return ScanResult._(result);
}