getMany method

  1. @override
Future<List<Map<String, dynamic>?>> getMany(
  1. List<String> keys
)

Implementation

@override
Future<List<Map<String, dynamic>?>> getMany(List<String> keys) async {
  final values = Command(_connection).send_object(['MGET', ...keys]);
  if (values case final List values) {
    return List<Map<String, dynamic>?>.from(
        values.map((e) => e == null ? null : jsonDecode(e)).toList());
  }

  throw Exception('Values are not iterable');
}