Open
Bug 1919676
Opened 18 days ago
Updated 18 days ago
Allow for inclusive and exclusive bounds in `nsIKeyValueDatabase` methods
Categories
(Core :: SQLite and Embedded Database Bindings, enhancement, P3)
Core
SQLite and Embedded Database Bindings
Tracking
()
NEW
People
(Reporter: lina, Unassigned)
References
(Blocks 1 open bug)
Details
nsIKeyValueDatabase.enumerate()
(and deleteRange
; bug 1919674) assumes an inclusive lower bound, and exclusive upper bound. Under the hood, Skv supports inclusive and exclusive ranges, so let's expose that in the nsIKeyValueDatabase
APIs, and make things a little easier for JS callers:
let pairs = await db.enumerate("from", to");
// ...Would be equivalent to:
let samePairs = await db.enumerate({ key: "from", included: true }, { key: "to", included: false });
await db.deleteRange("from", "to");
// Equivalent to:
await db.deleteRange({ key: "from", included: true }, { key: "to", included: false });
You need to log in
before you can comment on or make changes to this bug.
Description
•