Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

IDBKeyRange

import { IDBKeyRange } from "https://raw.githubusercontent.com/aaronhuggins/indexeddb/main/ponyfill.ts";

A key range can be a single value or a range with upper and lower bounds or endpoints. If the key range has both upper and lower bounds, then it is bounded; if it has no bounds, it is unbounded. A bounded key range can either be open (the endpoints are excluded) or closed (the endpoints are included). To retrieve all keys within a certain range, you can use the following code constructs:

interface IDBKeyRange {
readonly lower: any;
readonly lowerOpen: boolean;
prototype: IDBKeyRange;
readonly upper: any;
readonly upperOpen: boolean;
bound(
lower: any,
upper: any,
lowerOpen?: boolean,
upperOpen?: boolean,
): IDBKeyRange;
includes(key: any): boolean;
lowerBound(lower: any, open?: boolean): IDBKeyRange;
new (): IDBKeyRange;
only(value: any): IDBKeyRange;
upperBound(upper: any, open?: boolean): IDBKeyRange;
}
const IDBKeyRange;

§Properties

§
readonly lower: any
[src]

Returns lower bound, or undefined if none.

§
readonly lowerOpen: boolean
[src]

Returns true if the lower open flag is set, and false otherwise.

§
readonly upper: any
[src]

Returns upper bound, or undefined if none.

§
readonly upperOpen: boolean
[src]

Returns true if the upper open flag is set, and false otherwise.

§Methods

§
bound(
lower: any,
upper: any,
lowerOpen?: boolean,
upperOpen?: boolean,
): IDBKeyRange
[src]

Returns a new IDBKeyRange spanning from lower to upper. If lowerOpen is true, lower is not included in the range. If upperOpen is true, upper is not included in the range.

§
includes(key: any): boolean
[src]

Returns true if key is included in the range, and false otherwise.

§
lowerBound(lower: any, open?: boolean): IDBKeyRange
[src]

Returns a new IDBKeyRange starting at key with no upper bound. If open is true, key is not included in the range.

§
only(value: any): IDBKeyRange
[src]

Returns a new IDBKeyRange spanning only key.

§
upperBound(upper: any, open?: boolean): IDBKeyRange
[src]

Returns a new IDBKeyRange with no lower bound and ending at key. If open is true, key is not included in the range.