Home Reference Source Test
public class | source

KeyRange

This class represents range queries on an index (primary and secondary).

Static Method Summary

Static Public Methods
public static

bound(lower: *, upper: *, lowerOpen: boolean, upperOpen: boolean): KeyRange

A range bounded by both a lower and upper bound.

public static

lowerBound(lower: *, lowerOpen: boolean): KeyRange

If lowerOpen is false, all keys ≥ lower, all keys > lower otherwise.

public static

only(value: *): KeyRange

A range matching only exactly one value.

public static

upperBound(upper: *, upperOpen: boolean): KeyRange

If upperOpen is false, all keys ≤ upper, all keys < upper otherwise.

Member Summary

Public Members
public get

exactMatch: boolean

public get

lower: *

public get

lowerOpen: boolean

public get

upper: *

public get

upperOpen: boolean

Method Summary

Public Methods
public

includes(key: *): boolean

Returns true if the given key is included in this range.

Static Public Methods

public static bound(lower: *, upper: *, lowerOpen: boolean, upperOpen: boolean): KeyRange source

A range bounded by both a lower and upper bound. lowerOpen and upperOpen decide upon whether < (open) or ≤ (inclusive) comparisons should be used for comparison.

Params:

NameTypeAttributeDescription
lower *

The lower bound.

upper *

The upper bound.

lowerOpen boolean

Whether the lower bound is NOT part of the range.

upperOpen boolean

Whether the upper bound is NOT part of the range.

Return:

KeyRange

The corresponding KeyRange object.

public static lowerBound(lower: *, lowerOpen: boolean): KeyRange source

If lowerOpen is false, all keys ≥ lower, all keys > lower otherwise.

Params:

NameTypeAttributeDescription
lower *

The lower bound.

lowerOpen boolean

Whether the lower bound is NOT part of the range.

Return:

KeyRange

The corresponding KeyRange object.

public static only(value: *): KeyRange source

A range matching only exactly one value.

Params:

NameTypeAttributeDescription
value *

The value to match.

Return:

KeyRange

The corresponding KeyRange object.

public static upperBound(upper: *, upperOpen: boolean): KeyRange source

If upperOpen is false, all keys ≤ upper, all keys < upper otherwise.

Params:

NameTypeAttributeDescription
upper *

The upper bound.

upperOpen boolean

Whether the upper bound is NOT part of the range.

Return:

KeyRange

The corresponding KeyRange object.

Public Members

public get exactMatch: boolean source

public get lower: * source

public get lowerOpen: boolean source

public get upper: * source

public get upperOpen: boolean source

Public Methods

public includes(key: *): boolean source

Returns true if the given key is included in this range.

Params:

NameTypeAttributeDescription
key *

The key to test for.

Return:

boolean

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