summaryrefslogtreecommitdiff
path: root/ext/kv/01_db.ts
diff options
context:
space:
mode:
authorHeyang Zhou <zhy20000919@hotmail.com>2023-03-25 15:29:36 +0800
committerGitHub <noreply@github.com>2023-03-25 15:29:36 +0800
commit27834dfc109dd3eaa67d68d3b88155a375e1624a (patch)
treed8decf7c00dcd53989a66f7f31e7c346ccf087bd /ext/kv/01_db.ts
parent1c6b7973838df4526adaca6217458437a74e7530 (diff)
chore(ext/kv): add limits (#18415)
Diffstat (limited to 'ext/kv/01_db.ts')
-rw-r--r--ext/kv/01_db.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/kv/01_db.ts b/ext/kv/01_db.ts
index b423a2553..70e4c7fca 100644
--- a/ext/kv/01_db.ts
+++ b/ext/kv/01_db.ts
@@ -155,7 +155,7 @@ class Kv {
let batchSize = options.batchSize ?? (options.limit ?? 100);
if (batchSize <= 0) throw new Error("batchSize must be positive");
- if (batchSize > 500) batchSize = 500;
+ if (options.batchSize === undefined && batchSize > 500) batchSize = 500;
return new KvListIterator({
limit: options.limit,