public class JsIDBObjectStore extends JsElementalMixinBase implements IDBObjectStore
SVG_ZOOMANDPAN_DISABLE, SVG_ZOOMANDPAN_MAGNIFY, SVG_ZOOMANDPAN_UNKNOWN
Modifier | Constructor and Description |
---|---|
protected |
JsIDBObjectStore() |
Modifier and Type | Method and Description |
---|---|
JsIDBRequest |
_delete(IDBKeyRange keyRange)
Immediately returns an
IDBRequest object, and removes the record specified by the given key from this object store, and any indexes that reference it, in a separate thread. |
JsIDBRequest |
_delete(Object key)
Immediately returns an
IDBRequest object, and removes the record specified by the given key from this object store, and any indexes that reference it, in a separate thread. |
JsIDBRequest |
add(Object value)
Returns an IDBRequest object, and, in a separate thread, creates a structured clone of the
value , and stores the cloned value in the object store. |
JsIDBRequest |
add(Object value,
Object key)
Returns an IDBRequest object, and, in a separate thread, creates a structured clone of the
value , and stores the cloned value in the object store. |
JsIDBRequest |
clear()
If the mode of the transaction that this object store belongs to is
READ_ONLY , this method raises an IDBDatabaseException with its code set to READ_ONLY_ERR . |
JsIDBRequest |
count()
Immediately returns an IDBRequest object and asynchronously count the amount of objects in the object store that match the parameter, a key or a key range.
|
JsIDBRequest |
count(IDBKeyRange range)
Immediately returns an IDBRequest object and asynchronously count the amount of objects in the object store that match the parameter, a key or a key range.
|
JsIDBRequest |
count(Object key)
Immediately returns an IDBRequest object and asynchronously count the amount of objects in the object store that match the parameter, a key or a key range.
|
JsIDBIndex |
createIndex(String name,
String keyPath)
Creates and returns a new index in the connected database.
|
JsIDBIndex |
createIndex(String name,
String keyPath,
Mappable options)
Creates and returns a new index in the connected database.
|
void |
deleteIndex(String name)
Destroys the index with the specified name in the connected database.
|
JsIndexable |
getIndexNames()
A list of the names of indexes on objects in this object store.
|
Object |
getKeyPath()
The key path of this object store.
|
String |
getName()
The name of this object store.
|
JsIDBRequest |
getObject(IDBKeyRange key) |
JsIDBRequest |
getObject(Object key) |
JsIDBTransaction |
getTransaction() |
JsIDBIndex |
index(String name)
Opens the named index in this object store.
|
boolean |
isAutoIncrement() |
JsIDBRequest |
openCursor(IDBKeyRange range)
Immediately returns an IDBRequest object, and creates a cursor over the records in this object store, in a separate thread.
|
JsIDBRequest |
openCursor(IDBKeyRange range,
int direction)
Immediately returns an IDBRequest object, and creates a cursor over the records in this object store, in a separate thread.
|
JsIDBRequest |
openCursor(IDBKeyRange range,
String direction)
Immediately returns an IDBRequest object, and creates a cursor over the records in this object store, in a separate thread.
|
JsIDBRequest |
openCursor(Object key)
Immediately returns an IDBRequest object, and creates a cursor over the records in this object store, in a separate thread.
|
JsIDBRequest |
openCursor(Object key,
int direction)
Immediately returns an IDBRequest object, and creates a cursor over the records in this object store, in a separate thread.
|
JsIDBRequest |
openCursor(Object key,
String direction)
Immediately returns an IDBRequest object, and creates a cursor over the records in this object store, in a separate thread.
|
JsIDBRequest |
put(Object value)
Returns an IDBRequest object, and, in a separate thread, creates a structured clone of the
value , and stores the cloned value in the object store. |
JsIDBRequest |
put(Object value,
Object key)
Returns an IDBRequest object, and, in a separate thread, creates a structured clone of the
value , and stores the cloned value in the object store. |
addEventListener, addEventListener, beginElement, beginElementAt, dispatchEvent, endElement, endElementAt, getAnimatedClassName, getAnimatedHeight, getAnimatedHref, getAnimatedResult, getAnimatedTransform, getAnimatedWidth, getAnimatedX, getAnimatedY, getBBox, getChildElementCount, getCTM, getExternalResourcesRequired, getFarthestViewportElement, getFirstElementChild, getLastElementChild, getNearestViewportElement, getNextElementSibling, getPresentationAttribute, getPreserveAspectRatio, getPreviousElementSibling, getRequiredExtensions, getRequiredFeatures, getScreenCTM, getSvgStyle, getSystemLanguage, getTransformToElement, getViewBox, getXmllang, getXmlspace, getZoomAndPan, hasExtension, querySelector, querySelectorAll, removeEventListener, removeEventListener, setXmllang, setXmlspace, setZoomAndPan
at, at, intAt, intAt, length, numberAt, numberAt, setAt, setAt, setAt, setAt, setAt, setAt
cast, createArray, createArray, createFunction, createObject, equals, hashCode, toSource, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
intAt, length
numberAt
public final boolean isAutoIncrement()
isAutoIncrement
in interface IDBObjectStore
public final JsIndexable getIndexNames()
IDBObjectStore
getIndexNames
in interface IDBObjectStore
public final Object getKeyPath()
IDBObjectStore
getKeyPath
in interface IDBObjectStore
public final String getName()
IDBObjectStore
getName
in interface IDBObjectStore
public final JsIDBTransaction getTransaction()
getTransaction
in interface IDBObjectStore
public final JsIDBRequest add(Object value)
IDBObjectStore
Returns an IDBRequest object, and, in a separate thread, creates a structured clone of the value
, and stores the cloned value in the object store. If the record is successfully stored, then a success event is fired on the returned request object, using the IDBTransactionEvent interface, with the result
set to the key for the stored record, and transaction
set to the transaction in which this object store is opened. If a record already exists in the object store with the key
parameter as its key, then an error event is fired on the returned request object, with code set to CONSTRAINT_ERR
.
This method can raise an IDBDatabaseException with the following codes:
DATA_ERR
READ_ONLY_ERR
READ_ONLY
.TRANSACTION_INACTIVE_ERR
This method can raise a DOMException with the following code:
DATA_CLONE_ERR
add
in interface IDBObjectStore
public final JsIDBRequest add(Object value, Object key)
IDBObjectStore
Returns an IDBRequest object, and, in a separate thread, creates a structured clone of the value
, and stores the cloned value in the object store. If the record is successfully stored, then a success event is fired on the returned request object, using the IDBTransactionEvent interface, with the result
set to the key for the stored record, and transaction
set to the transaction in which this object store is opened. If a record already exists in the object store with the key
parameter as its key, then an error event is fired on the returned request object, with code set to CONSTRAINT_ERR
.
This method can raise an IDBDatabaseException with the following codes:
DATA_ERR
READ_ONLY_ERR
READ_ONLY
.TRANSACTION_INACTIVE_ERR
This method can raise a DOMException with the following code:
DATA_CLONE_ERR
add
in interface IDBObjectStore
public final JsIDBRequest clear()
IDBObjectStore
If the mode of the transaction that this object store belongs to is READ_ONLY
, this method raises an IDBDatabaseException with its code set to READ_ONLY_ERR
. Otherwise, this method creates and immediately returns an IDBRequest object, and clears this object store in a separate thread. Clearing an object store consists of removing all records from the object store and removing all records in indexes that reference the object store.
This method can raise an IDBDatabaseException with the following codes:
READ_ONLY_ERR
TRANSACTION_INACTIVE_ERR
clear
in interface IDBObjectStore
public final JsIDBRequest count()
IDBObjectStore
Immediately returns an IDBRequest object and asynchronously count the amount of objects in the object store that match the parameter, a key or a key range. If the parameter is not valid returns an exception.
This method can raise an IDBDatabaseException with the following codes:
DATA_ERR
NOT_ALLOWED_ERR
count
in interface IDBObjectStore
public final JsIDBRequest count(IDBKeyRange range)
IDBObjectStore
Immediately returns an IDBRequest object and asynchronously count the amount of objects in the object store that match the parameter, a key or a key range. If the parameter is not valid returns an exception.
This method can raise an IDBDatabaseException with the following codes:
DATA_ERR
NOT_ALLOWED_ERR
count
in interface IDBObjectStore
public final JsIDBRequest count(Object key)
IDBObjectStore
Immediately returns an IDBRequest object and asynchronously count the amount of objects in the object store that match the parameter, a key or a key range. If the parameter is not valid returns an exception.
This method can raise an IDBDatabaseException with the following codes:
DATA_ERR
NOT_ALLOWED_ERR
count
in interface IDBObjectStore
public final JsIDBIndex createIndex(String name, String keyPath)
IDBObjectStore
Creates and returns a new index in the connected database. Note that this method must be called only from a VERSION_CHANGE
transaction callback.
IDBIndex createIndex ( in DOMString name, in DOMString keyPath, in Object optionalParameters ) raises (IDBDatabaseException);
IDBIndexParameters
, which is not yet recognized by any browserOptions object whose attributes are optional parameters to the method. It includes the following properties:
Attribute | Description |
---|---|
unique | If true, the index will not allow duplicate values for a single key. |
multientry | If true, the index will add an entry in the index for each array element when the keypath resolves to an Array. If false, it will add one single entry containing the Array. |
Unknown parameters are ignored.
This method can raise an IDBDatabaseException with the following codes:
CONSTRAINT_ERR
NOT_ALLOWED_ERR
VERSION_CHANGE
transaction callback.createIndex
in interface IDBObjectStore
public final JsIDBIndex createIndex(String name, String keyPath, Mappable options)
IDBObjectStore
Creates and returns a new index in the connected database. Note that this method must be called only from a VERSION_CHANGE
transaction callback.
IDBIndex createIndex ( in DOMString name, in DOMString keyPath, in Object optionalParameters ) raises (IDBDatabaseException);
IDBIndexParameters
, which is not yet recognized by any browserOptions object whose attributes are optional parameters to the method. It includes the following properties:
Attribute | Description |
---|---|
unique | If true, the index will not allow duplicate values for a single key. |
multientry | If true, the index will add an entry in the index for each array element when the keypath resolves to an Array. If false, it will add one single entry containing the Array. |
Unknown parameters are ignored.
This method can raise an IDBDatabaseException with the following codes:
CONSTRAINT_ERR
NOT_ALLOWED_ERR
VERSION_CHANGE
transaction callback.createIndex
in interface IDBObjectStore
public final JsIDBRequest _delete(IDBKeyRange keyRange)
IDBObjectStore
Immediately returns an IDBRequest
object, and removes the record specified by the given key from this object store, and any indexes that reference it, in a separate thread. If no record exists in this object store corresponding to the key, an error event is fired on the returned request object, with its code
set to NOT_FOUND_ERR
and an appropriate message
. If the record is successfully removed, then a success event is fired on the returned request object, using the IDBTransactionEvent
interface, with the result
set to undefined
, and transaction set to the transaction in which this object store is opened.
IDBRequest delete ( in any key ) raises (IDBDatabaseException);
This method can raise an IDBDatabaseException with the following codes:
_delete
in interface IDBObjectStore
public final JsIDBRequest _delete(Object key)
IDBObjectStore
Immediately returns an IDBRequest
object, and removes the record specified by the given key from this object store, and any indexes that reference it, in a separate thread. If no record exists in this object store corresponding to the key, an error event is fired on the returned request object, with its code
set to NOT_FOUND_ERR
and an appropriate message
. If the record is successfully removed, then a success event is fired on the returned request object, using the IDBTransactionEvent
interface, with the result
set to undefined
, and transaction set to the transaction in which this object store is opened.
IDBRequest delete ( in any key ) raises (IDBDatabaseException);
This method can raise an IDBDatabaseException with the following codes:
_delete
in interface IDBObjectStore
public final void deleteIndex(String name)
IDBObjectStore
Destroys the index with the specified name in the connected database. Note that this method must be called only from a VERSION_CHANGE
transaction callback.
void removeIndex( in DOMString indexName ) raises (IDBDatabaseException);
NOT_ALLOWED_ERR
READ_ONLY
or SNAPSHOT_READ
.TRANSACTION_INACTIVE_ERR
This method can raise an IDBDatabaseException with the following codes:
NOT_ALLOWED_ERR
NOT_FOUND_ERR
deleteIndex
in interface IDBObjectStore
public final JsIDBRequest getObject(IDBKeyRange key)
getObject
in interface IDBObjectStore
public final JsIDBRequest getObject(Object key)
getObject
in interface IDBObjectStore
public final JsIDBIndex index(String name)
IDBObjectStore
Opens the named index in this object store.
IDBIndex
This method can raise an IDBDatabaseException with the following code:
NOT_FOUND_ERR
index
in interface IDBObjectStore
public final JsIDBRequest openCursor(IDBKeyRange range)
IDBObjectStore
Immediately returns an IDBRequest object, and creates a cursor over the records in this object store, in a separate thread. If there is even a single record that matches the key range, then a success event is fired on the returned object, with its result
set to the IDBCursor object for the new cursor. If no records match the key range, then a success event is fired on the returned object, with its result
set to null.
IDBRequest openCursor ( in optional IDBKeyRange range, in optional unsigned short direction ) raises (IDBDatabaseException);
IDBRequest
This method can raise an IDBDatabaseException with the following code:
NOT_ALLOWED_ERR
openCursor
in interface IDBObjectStore
public final JsIDBRequest openCursor(IDBKeyRange range, String direction)
IDBObjectStore
Immediately returns an IDBRequest object, and creates a cursor over the records in this object store, in a separate thread. If there is even a single record that matches the key range, then a success event is fired on the returned object, with its result
set to the IDBCursor object for the new cursor. If no records match the key range, then a success event is fired on the returned object, with its result
set to null.
IDBRequest openCursor ( in optional IDBKeyRange range, in optional unsigned short direction ) raises (IDBDatabaseException);
IDBRequest
This method can raise an IDBDatabaseException with the following code:
NOT_ALLOWED_ERR
openCursor
in interface IDBObjectStore
public final JsIDBRequest openCursor(Object key)
IDBObjectStore
Immediately returns an IDBRequest object, and creates a cursor over the records in this object store, in a separate thread. If there is even a single record that matches the key range, then a success event is fired on the returned object, with its result
set to the IDBCursor object for the new cursor. If no records match the key range, then a success event is fired on the returned object, with its result
set to null.
IDBRequest openCursor ( in optional IDBKeyRange range, in optional unsigned short direction ) raises (IDBDatabaseException);
IDBRequest
This method can raise an IDBDatabaseException with the following code:
NOT_ALLOWED_ERR
openCursor
in interface IDBObjectStore
public final JsIDBRequest openCursor(Object key, String direction)
IDBObjectStore
Immediately returns an IDBRequest object, and creates a cursor over the records in this object store, in a separate thread. If there is even a single record that matches the key range, then a success event is fired on the returned object, with its result
set to the IDBCursor object for the new cursor. If no records match the key range, then a success event is fired on the returned object, with its result
set to null.
IDBRequest openCursor ( in optional IDBKeyRange range, in optional unsigned short direction ) raises (IDBDatabaseException);
IDBRequest
This method can raise an IDBDatabaseException with the following code:
NOT_ALLOWED_ERR
openCursor
in interface IDBObjectStore
public final JsIDBRequest openCursor(IDBKeyRange range, int direction)
IDBObjectStore
Immediately returns an IDBRequest object, and creates a cursor over the records in this object store, in a separate thread. If there is even a single record that matches the key range, then a success event is fired on the returned object, with its result
set to the IDBCursor object for the new cursor. If no records match the key range, then a success event is fired on the returned object, with its result
set to null.
IDBRequest openCursor ( in optional IDBKeyRange range, in optional unsigned short direction ) raises (IDBDatabaseException);
IDBRequest
This method can raise an IDBDatabaseException with the following code:
NOT_ALLOWED_ERR
openCursor
in interface IDBObjectStore
public final JsIDBRequest openCursor(Object key, int direction)
IDBObjectStore
Immediately returns an IDBRequest object, and creates a cursor over the records in this object store, in a separate thread. If there is even a single record that matches the key range, then a success event is fired on the returned object, with its result
set to the IDBCursor object for the new cursor. If no records match the key range, then a success event is fired on the returned object, with its result
set to null.
IDBRequest openCursor ( in optional IDBKeyRange range, in optional unsigned short direction ) raises (IDBDatabaseException);
IDBRequest
This method can raise an IDBDatabaseException with the following code:
NOT_ALLOWED_ERR
openCursor
in interface IDBObjectStore
public final JsIDBRequest put(Object value)
IDBObjectStore
Returns an IDBRequest object, and, in a separate thread, creates a structured clone of the value
, and stores the cloned value in the object store. If the record is successfully stored, then a success event is fired on the returned request object, using the IDBTransactionEvent interface, with the result
set to the key for the stored record, and transaction
set to the transaction in which this object store is opened.
This method can raise an IDBDatabaseException with the following codes:
key
parameter was not passedvalue
object does not have a property identified by the object store's key path.NOT_ALLOWED_ERR
READ_ONLY
or SNAPSHOT_READ
.SERIAL_ERR
This method can raise a DOMException with the following code:
DATA_CLONE_ERR
put
in interface IDBObjectStore
public final JsIDBRequest put(Object value, Object key)
IDBObjectStore
Returns an IDBRequest object, and, in a separate thread, creates a structured clone of the value
, and stores the cloned value in the object store. If the record is successfully stored, then a success event is fired on the returned request object, using the IDBTransactionEvent interface, with the result
set to the key for the stored record, and transaction
set to the transaction in which this object store is opened.
This method can raise an IDBDatabaseException with the following codes:
key
parameter was not passedvalue
object does not have a property identified by the object store's key path.NOT_ALLOWED_ERR
READ_ONLY
or SNAPSHOT_READ
.SERIAL_ERR
This method can raise a DOMException with the following code:
DATA_CLONE_ERR
put
in interface IDBObjectStore
Copyright © 2016. All rights reserved.