diff options
author | Heyang Zhou <zhy20000919@hotmail.com> | 2023-03-25 15:29:36 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-25 15:29:36 +0800 |
commit | 27834dfc109dd3eaa67d68d3b88155a375e1624a (patch) | |
tree | d8decf7c00dcd53989a66f7f31e7c346ccf087bd /ext/kv/01_db.ts | |
parent | 1c6b7973838df4526adaca6217458437a74e7530 (diff) |
chore(ext/kv): add limits (#18415)
Diffstat (limited to 'ext/kv/01_db.ts')
-rw-r--r-- | ext/kv/01_db.ts | 2 |
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, |