Skip to content

Commit 6bad340

Browse files
committed
fix stream
1 parent 7debded commit 6bad340

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

binding/dart/lib/storage/schema/iterator.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import 'dart:math';
2+
13
import '../executor/executor.dart';
24

35
class StorageIterator {
@@ -49,6 +51,7 @@ class StorageIterator {
4951
int count = 1,
5052
}) async* {
5153
var index = 0;
54+
if (limit != null) count = min(count, limit);
5255
if (filter == null) {
5356
List<List<dynamic>>? tuples;
5457
while ((tuples = await _executor.next(this, count)) != null) {

0 commit comments

Comments
 (0)