The goog.db.KeyRange Class

goog.db.KeyRange(range)

Creates a new IDBKeyRange wrapper object. Should not be created directly, instead use one of the static factory methods. For example:

range {!IDBKeyRange}
Underlying IDBKeyRange object.
@see
goog.db.KeyRange.bound
@see
goog.db.KeyRange.lowerBound

.bound(lower, upper, opt_lowerOpen, opt_upperOpen)

Creates a key range with upper and lower bounds.

lower {Object}
The value of the lower bound.
upper {Object}
The value of the upper bound.
opt_lowerOpen {boolean=}
If true, the range excludes the lower bound value.
opt_upperOpen {boolean=}
If true, the range excludes the upper bound value.
returns {!goog.db.KeyRange}
The key range.

.lowerBound(lower, opt_lowerOpen)

Creates a key range with a lower bound only, finishes at the last record.

lower {Object}
The value of the lower bound.
opt_lowerOpen {boolean=}
If true, the range excludes the lower bound value.
returns {!goog.db.KeyRange}
The key range.

.only(key)

Creates a new key range for a single value.

key {Object}
The single value in the range.
returns {!goog.db.KeyRange}
The key range.

.upperBound(upper, opt_upperOpen)

Creates a key range with a upper bound only, starts at the first record.

upper {Object}
The value of the upper bound.
opt_upperOpen {boolean=}
If true, the range excludes the upper bound value.
returns {!goog.db.KeyRange}
The key range.