goog.db.Index |
index
: !IDBIndex
Underlying IDBIndex object.
|
Fetches a single object from the object store. Even if there are multiple
objects that match the given key, this method will get only one of them.
Arguments:
Returns: !goog.async.Deferred
The deferred object for the given record.
|
code » | ||||
Gets all indexed objects. If the key is provided, gets all indexed objects
that match the key instead.
Arguments:
Returns: !goog.async.Deferred
A deferred array of objects that match the
key.
|
code » | ||||
Gets the keys to look up all the indexed objects. If the key is provided,
gets all records for objects that match the key instead.
Arguments:
Returns: !goog.async.Deferred
A deferred array of keys for objects that
match the key.
|
code » | ||||
Helper function for getAll and getAllKeys.
Arguments:
Returns: !goog.async.Deferred
The resulting deferred array of objects.
|
code » | ||||
Looks up a single object from the object store and gives back the key that
it's listed under in the object store. Even if there are multiple records
that match the given key, this method returns the first.
Arguments:
Returns: !goog.async.Deferred
The deferred key for the record that matches
the key.
|
code » | ||||
No description.
Returns: string
Key path of the index.
|
code » | ||||
No description.
Returns: string
Name of the index.
|
code » | ||||
Helper function for get and getKey.
Arguments:
Returns: !goog.async.Deferred
The resulting deferred object.
|
code » | ||||
No description.
Returns: boolean
True if the index enforces that there is only one object
for each unique value it indexes on.
|
code » | ||||
Opens a cursor over the specified key range. Returns a cursor object which is
able to iterate over the given range.
Example usage:
var cursor = index.openCursor(goog.db.Range.bound('a', 'c'));
var key = goog.events.listen(
cursor, goog.db.Cursor.EventType.NEW_DATA,
function() {
// Do something with data.
cursor.next();
});
goog.events.listenOnce(
cursor, goog.db.Cursor.EventType.COMPLETE,
function() {
// Clean up listener, and perform a finishing operation on the data.
goog.events.unlistenByKey(key);
});
Arguments:
Returns: !goog.db.Cursor
The cursor.
|
code » |
![]()
Underlying IndexedDB index object.
|
Code » |