new IndexedDBStore(name) → {Object}
Creates a new IndexedDBStore.
Parameters:
Name | Type | Description |
---|---|---|
name |
String | The name of the store. |
- Source:
Returns:
The new IndexedDBStore.
- Type
- Object
Members
-
mechanism
-
Identifies the underlying mechanism used by the store.
- Source:
Methods
-
<static> create(name) → {Object}
-
Creates a new IndexedDBStore.
Parameters:
Name Type Description name
String The name of the store. - Source:
Returns:
The new IndexedDBStore.- Type
- Object
-
<static> isSupported() → {Boolean}
-
Returns whether IndexedDB is supported.
- Source:
Returns:
True if IndexedDB is supported, false otherwise.- Type
- Boolean
-
add(key, value, success, error)
-
Adds a key/value pair to the store
Parameters:
Name Type Description key
String The key value
Object The value success
function The success callback error
function The error callback - Source:
-
addOrUpdate(key, value, success, error)
-
Adds or updates a key/value pair in the store
Parameters:
Name Type Description key
String The key value
Object The value success
function The success callback error
function The error callback - Source:
-
clear(success, error)
-
Clears the store
Parameters:
Name Type Description success
function The success callback error
function The error callback - Source:
-
close()
-
Closes the connection to the database
- Source:
-
contains(key, success, error)
-
Returns whether the store contains a key
Parameters:
Name Type Description key
String The key success
function The success callback error
function The error callback - Source:
-
getAllKeys(success, error)
-
Gets all the keys from the store
Parameters:
Name Type Description success
function The success callback error
function The error callback - Source:
-
read(key, success, error)
-
Reads the value for the specified key
Parameters:
Name Type Description key
String The key success
function The success callback error
function The error callback If the key does not exist, the success handler will be called with value = undefined - Source:
-
remove(key, success, error)
-
Removes the specified key from the store
Parameters:
Name Type Description key
String The key success
function The success callback error
function The error callback - Source:
-
update(key, value, success, error)
-
Updates a key/value pair in the store
Parameters:
Name Type Description key
String The key value
Object The value success
function The success callback error
function The error callback - Source: