store . [name](#dom-idbobjectstore-name)

    Returns the of the store.

    store . [name](#dom-idbobjectstore-name) = newName

    Updates the name of the store to newName.

    Throws “[InvalidStateError](https://heycam.github.io/webidl/#invalidstateerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException) if not called within an .

    store . [keyPath](#dom-idbobjectstore-keypath)

    Returns the key path of the store, or null if none.

    list . [indexNames](#dom-idbobjectstore-indexnames)

    Returns a list of the names of indexes in the store.

    store . [transaction](#dom-idbobjectstore-transaction)

    Returns the associated .

    store . [autoIncrement](#dom-idbobjectstore-autoincrement)

    Returns true if the store has a key generator, and false otherwise.

    The name attribute’s getter must return ‘s name.

    Is this the same as the ‘s name? As long as the has not finished, this is the same as the associated ‘s name. But once the has finished, this attribute will not reflect changes made with a later .

    The [name](#dom-idbobjectstore-name) attribute’s setter must run these steps:

    1. Let name be the given value.

    2. Let transaction be ‘s transaction.

    3. Let store be ‘s object store.

    4. If store has been deleted, an “[InvalidStateError](https://heycam.github.io/webidl/#invalidstateerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    5. If transaction is not an upgrade transaction, an “[InvalidStateError](https://heycam.github.io/webidl/#invalidstateerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    6. If transaction’s state is not , throw a “[TransactionInactiveError](https://heycam.github.io/webidl/#transactioninactiveerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    7. If store’s is equal to name, terminate these steps.

    8. If an object store name already exists in store’s database, a “[ConstraintError](https://heycam.github.io/webidl/#constrainterror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    9. Set store’s name to name.

    10. Set ‘s name to name.

    The keyPath attribute’s getter must return ‘s object store‘s , or null if none. The key path is converted as a [DOMString](https://heycam.github.io/webidl/#idl-DOMString) (if a string) or a (if a list of strings), per [WEBIDL].

    The returned value is not the same instance that was used when the was created. However, if this attribute returns an object (specifically an Array), it returns the same object instance every time it is inspected. Changing the properties of the object has no effect on the .

    The indexNames attribute’s getter must return a [DOMStringList](https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#domstringlist) associated with a sorted name list of the of indexes in ‘s index set.

    Is this the same as ‘s list of index ? As long as the transaction has not , this is the same as the associated object store‘s list of names. But once the has finished, this attribute will not reflect changes made with a later .

    The transaction attribute’s getter must return this‘s .

    The autoIncrement attribute’s getter must return true if this‘s has a key generator, and false otherwise.

    The following methods throw a “[ReadOnlyError](https://heycam.github.io/webidl/#readonlyerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException) if called within a , and a “[TransactionInactiveError](https://heycam.github.io/webidl/#transactioninactiveerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException) if called when the transaction is not .

    request = store . [put](#dom-idbobjectstore-put)(value [, key])

    request = store . [add](#dom-idbobjectstore-add)(value [, key])

    Adds or updates a record in store with the given value and key.

    If the store uses and key is specified a “[DataError](https://heycam.github.io/webidl/#dataerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException) will be thrown.

    If [put()](#dom-idbobjectstore-put) is used, any existing record with the will be replaced. If [add()](#dom-idbobjectstore-add) is used, and if a record with the already exists the request will fail, with request’s [error](#dom-idbrequest-error) set to a “[ConstraintError](https://heycam.github.io/webidl/#constrainterror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    If successful, request’s [result](#dom-idbrequest-result) will be the record‘s .

    request = store . [delete](#dom-idbobjectstore-delete)(query)

    Deletes records in store with the given or in the given key range in query.

    If successful, request’s [result](#dom-idbrequest-result) will be undefined.

    request = store . [clear](#dom-idbobjectstore-clear)()

    Deletes all in store.

    If successful, request’s [result](#dom-idbrequest-result) will be undefined.

    The put(value, key) method, when invoked, must return the result of running add or put with , value, key and the no-overwrite flag false.

    The add(value, key) method, when invoked, must return the result of running add or put with , value, key and the no-overwrite flag true.

    To add or put with handle, value, key, and no-overwrite flag, run these steps:

    1. Let transaction be handle’s transaction.

    2. Let store be handle’s .

    3. If store has been deleted, throw an “[InvalidStateError](https://heycam.github.io/webidl/#invalidstateerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    4. If transaction’s is not active, then a “[TransactionInactiveError](https://heycam.github.io/webidl/#transactioninactiveerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    5. If transaction is a read-only transaction, a “[ReadOnlyError](https://heycam.github.io/webidl/#readonlyerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    6. If store uses in-line keys and key was given, a “[DataError](https://heycam.github.io/webidl/#dataerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    7. If store uses out-of-line keys and has no and key was not given, throw a “[DataError](https://heycam.github.io/webidl/#dataerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    8. If key was given, then:

      1. Let r be the result of running with key. Rethrow any exceptions.

      2. If r is invalid, throw a “[DataError](https://heycam.github.io/webidl/#dataerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

      3. Let key be r.

    9. Let targetRealm be a user-agent defined .

    10. Let clone be a clone of value in targetRealm during transaction. Rethrow any exceptions.

      Why create a copy of the value? The value is serialized when stored. Treating it as a copy here allows other algorithms in this specification to treat it as an ECMAScript value, but implementations can optimize this if the difference in behavior is not observable.

    11. If store uses , then:

      1. Let kpk be the result of running extract a key from a value using a key path with clone and store’s . Rethrow any exceptions.

      2. If kpk is invalid, throw a “[DataError](https://heycam.github.io/webidl/#dataerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

      3. If kpk is not failure, let key be kpk.

      4. Otherwise (kpk is failure):

        1. If store does not have a , throw a “[DataError](https://heycam.github.io/webidl/#dataerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

        2. Otherwise, if with clone and store’s key path return false, a “[DataError](https://heycam.github.io/webidl/#dataerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    12. Return the result (an [IDBRequest](#idbrequest)) of running asynchronously execute a request with handle as source and as operation, using store, the clone as value, key, and no-overwrite flag.

    The delete(query) method, when invoked, must run these steps:

    1. Let transaction be this‘s .

    2. Let store be this‘s .

    3. If transaction’s state is not , then throw a “[TransactionInactiveError](https://heycam.github.io/webidl/#transactioninactiveerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    4. If transaction is a , throw a “[ReadOnlyError](https://heycam.github.io/webidl/#readonlyerror)“ .

    5. Let range be the result of running with query and null disallowed flag true. Rethrow any exceptions.

    6. Return the result (an [IDBRequest](#idbrequest)) of running asynchronously execute a request with as source and delete records from an object store as operation, using store and range.

    The query parameter may be a or key range (an [IDBKeyRange](#idbkeyrange)) identifying the keys to be deleted.

    Unlike other methods which take keys or key ranges, this method does not allow null to be given as key. This is to reduce the risk that a small bug would clear a whole object store.

    The clear() method, when invoked, must run these steps:

    1. Let transaction be this‘s .

    2. Let store be this‘s .

    3. If transaction’s state is not , then throw a “[TransactionInactiveError](https://heycam.github.io/webidl/#transactioninactiveerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    4. If transaction is a , throw a “[ReadOnlyError](https://heycam.github.io/webidl/#readonlyerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    5. Return the result (an [IDBRequest](#idbrequest)) of running with this as source and as operation, using store.

    The following methods throw a “[TransactionInactiveError](https://heycam.github.io/webidl/#transactioninactiveerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException) if called when the transaction is not .

    request = store . [get](#dom-idbobjectstore-get)(query)

    Retrieves the value of the first matching the given key or in query.

    If successful, request’s [result](#dom-idbrequest-result) will be the value, or undefined if there was no matching .

    request = store . [getKey](#dom-idbobjectstore-getkey)(query)

    Retrieves the key of the first matching the given key or in query.

    If successful, request’s [result](#dom-idbrequest-result) will be the key, or undefined if there was no matching .

    request = store . [getAll](#dom-idbobjectstore-getall)(query [, count])

    Retrieves the values of the matching the given key or in query (up to count if given).

    If successful, request’s [result](#dom-idbrequest-result) will be an Array of the .

    request = store . [getAllKeys](#dom-idbobjectstore-getallkeys)(query [, count])

    Retrieves the keys of matching the given key or in query (up to count if given).

    If successful, request’s [result](#dom-idbrequest-result) will be an Array of the .

    request = store . [count](#dom-idbobjectstore-count)(query)

    Retrieves the number of records matching the given or key range in query.

    If successful, request’s [result](#dom-idbrequest-result) will be the count.

    The get(query) method, when invoked, must run these steps:

    1. Let transaction be ‘s transaction.

    2. Let store be ‘s object store.

    3. If store has been deleted, an “[InvalidStateError](https://heycam.github.io/webidl/#invalidstateerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    4. If transaction’s state is not , then throw a “[TransactionInactiveError](https://heycam.github.io/webidl/#transactioninactiveerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    5. Let range be the result of running with query and null disallowed flag true. Rethrow any exceptions.

    6. Return the result (an [IDBRequest](#idbrequest)) of running asynchronously execute a request with as source and retrieve a value from an object store as operation, using the as targetRealm, store and range.

    The query parameter may be a key or (an [IDBKeyRange](#idbkeyrange)) identifying the record to be retrieved. If a range is specified, the method retrieves the first existing value in that range.

    This method produces the same result if a record with the given key doesn’t exist as when a record exists, but has undefined as value. If you need to tell the two situations apart, you can use [openCursor()](#dom-idbobjectstore-opencursor) with the same key. This will return a cursor with undefined as value if a record exists, or no cursor if no such record exists.

    The getKey(query) method, when invoked, must run these steps:

    1. Let transaction be ‘s transaction.

    2. Let store be ‘s object store.

    3. If store has been deleted, an “[InvalidStateError](https://heycam.github.io/webidl/#invalidstateerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    4. If transaction’s state is not , then throw a “[TransactionInactiveError](https://heycam.github.io/webidl/#transactioninactiveerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    5. Let range be the result of running with query and null disallowed flag true. Rethrow any exceptions.

    6. Return the result (an [IDBRequest](#idbrequest)) of running asynchronously execute a request with as source and retrieve a key from an object store as operation, using store and range.

    The query parameter may be a or key range (an [IDBKeyRange](#idbkeyrange)) identifying the key to be retrieved. If a range is specified, the method retrieves the first existing key in that range.

    The getAll(query, count) method, when invoked, must run these steps:

    1. Let transaction be this‘s .

    2. Let store be this‘s .

    3. If store has been deleted, throw an “[InvalidStateError](https://heycam.github.io/webidl/#invalidstateerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    4. If transaction’s is not active, then a “[TransactionInactiveError](https://heycam.github.io/webidl/#transactioninactiveerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    5. Let range be the result of running convert a value to a key range with query. Rethrow any exceptions.

    6. Return the result (an [IDBRequest](#idbrequest)) of running with this as source and as operation, using the current Realm as targetRealm, store, range, and count if given.

    The query parameter may be a or key range (an [IDBKeyRange](#idbkeyrange)) identifying the to be retrieved. If null or not given, an unbounded key range is used. If count is specified and there are more than count records in range, only the first count will be retrieved.

    The getAllKeys(query, count) method, when invoked, must run these steps:

    1. Let transaction be ‘s transaction.

    2. Let store be ‘s object store.

    3. If store has been deleted, an “[InvalidStateError](https://heycam.github.io/webidl/#invalidstateerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    4. If transaction’s state is not , then throw a “[TransactionInactiveError](https://heycam.github.io/webidl/#transactioninactiveerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    5. Let range be the result of running with query. Rethrow any exceptions.

    6. Return the result (an [IDBRequest](#idbrequest)) of running asynchronously execute a request with as source and retrieve multiple keys from an object store as operation, using store, range, and count if given.

    The query parameter may be a or key range (an [IDBKeyRange](#idbkeyrange)) identifying the keys to be retrieved. If null or not given, an unbounded key range is used. If count is specified and there are more than count keys in range, only the first count will be retrieved.

    The count(query) method, when invoked, must run these steps:

    1. Let transaction be ‘s transaction.

    2. Let store be ‘s object store.

    3. If store has been deleted, an “[InvalidStateError](https://heycam.github.io/webidl/#invalidstateerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    4. If transaction’s state is not , then throw a “[TransactionInactiveError](https://heycam.github.io/webidl/#transactioninactiveerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    5. Let range be the result of running with query. Rethrow any exceptions.

    6. Return the result (an [IDBRequest](#idbrequest)) of running asynchronously execute a request with as source and count the records in a range as operation, using source and range.

    The query parameter may be a or key range (an [IDBKeyRange](#idbkeyrange)) identifying the keys to be counted. If null or not given, an unbounded key range is used.

    The following methods throw a “[TransactionInactiveError](https://heycam.github.io/webidl/#transactioninactiveerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException) if called when the is not active.

    request = store . [openCursor](#dom-idbobjectstore-opencursor)([query [, direction = “next”]])

    Opens a over the records matching query, ordered by direction. If query is null, all in store are matched.

    request = store . [openKeyCursor](#dom-idbobjectstore-openkeycursor)([query [, direction = “next”]])

    Opens a cursor with set to true over the records matching query, ordered by direction. If query is null, all in store are matched.

    If successful, request’s [result](#dom-idbrequest-result) will be an [IDBCursor](#idbcursor) pointing at the first matching record, or null if there were no matching .

    The openCursor(query, direction) method, when invoked, must run these steps:

    1. Let transaction be this‘s .

    2. Let store be this‘s .

    3. If store has been deleted, throw an ““ [DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    4. If transaction’s is not active, then a “[TransactionInactiveError](https://heycam.github.io/webidl/#transactioninactiveerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    5. Let range be the result of running convert a value to a key range with query. Rethrow any exceptions.

    6. Let cursor be a new with its transaction set to transaction, undefined , direction set to direction, set to false, undefined key and , source set to store, set to range, and key only flag set to false.

    7. Let request be the result of running with this as source and as operation, using the current Realm as targetRealm, and cursor.

    8. Return request.

    The query parameter may be a or key range (an [IDBKeyRange](#idbkeyrange)) to use as the ‘s range. If null or not given, an is used.

    The openKeyCursor(query, direction) method, when invoked, must run these steps:

    1. Let transaction be this‘s .

    2. Let store be this‘s .

    3. If store has been deleted, throw an “[InvalidStateError](https://heycam.github.io/webidl/#invalidstateerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    4. If transaction’s is not active, then a “[TransactionInactiveError](https://heycam.github.io/webidl/#transactioninactiveerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    5. Let range be the result of running convert a value to a key range with query. Rethrow any exceptions.

    6. Let cursor be a new with its transaction set to transaction, undefined , direction set to direction, set to false, undefined key and , source set to store, set to range, and key only flag set to true.

    7. Let request be the result of running with this as source and as operation, using the current Realm as targetRealm, and cursor.

    8. Set cursor’s to request.

    9. Return request.

    The query parameter may be a key or (an [IDBKeyRange](#idbkeyrange)) to use as the cursor‘s . If null or not given, an unbounded key range is used.

    index = store . index(name)

    Returns an [IDBIndex](#idbindex) for the named name in store.

    index = store . [createIndex](#dom-idbobjectstore-createindex)(name, keyPath [, options])

    Creates a new index in store with the given name, keyPath and options and returns a new [IDBIndex](#idbindex). If the keyPath and options define constraints that cannot be satisfied with the data already in store the will abort with a “[ConstraintError](https://heycam.github.io/webidl/#constrainterror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    Throws an “[InvalidStateError](https://heycam.github.io/webidl/#invalidstateerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException) if not called within an .

    store . [deleteIndex](#dom-idbobjectstore-deleteindex)(name)

    Deletes the index in store with the given name.

    Throws an “[InvalidStateError](https://heycam.github.io/webidl/#invalidstateerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException) if not called within an .

    The createIndex(name, keyPath, options) method, when invoked, must run these steps:

    1. Let transaction be this‘s .

    2. Let store be this‘s .

    3. If transaction is not an upgrade transaction, an “[InvalidStateError](https://heycam.github.io/webidl/#invalidstateerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    4. If store has been deleted, throw an “[InvalidStateError](https://heycam.github.io/webidl/#invalidstateerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    5. If transaction’s is not active, then a “[TransactionInactiveError](https://heycam.github.io/webidl/#transactioninactiveerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    6. If an index name already exists in store, throw a “[ConstraintError](https://heycam.github.io/webidl/#constrainterror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    7. If keyPath is not a , throw a “[SyntaxError](https://heycam.github.io/webidl/#syntaxerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    8. Let unique be options’s [unique](#dom-idbindexparameters-unique) member.

    9. Let multiEntry be options’s [multiEntry](#dom-idbindexparameters-multientry) member.

    10. If keyPath is a sequence and multiEntry is true, an “[InvalidAccessError](https://heycam.github.io/webidl/#invalidaccesserror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    11. Let index be a new index in store. Set index’s to name, key path to keyPath, to unique, and multiEntry flag to multiEntry.

    12. Add index to ‘s index set.

    13. Return a new associated with index and this.

    This method creates and returns a new with the given name in the object store. Note that this method must only be called from within an .

    The index that is requested to be created can contain constraints on the data allowed in the index’s referenced object store, such as requiring uniqueness of the values referenced by the index’s . If the referenced object store already contains data which violates these constraints, this must not cause the implementation of [createIndex()](#dom-idbobjectstore-createindex) to throw an exception or affect what it returns. The implementation must still create and return an [IDBIndex](#idbindex) object, and the implementation must to abort the upgrade transaction which was used for the [createIndex()](#dom-idbobjectstore-createindex) call.

    This method synchronously modifies the [indexNames](#dom-idbobjectstore-indexnames) property on the [IDBObjectStore](#idbobjectstore) instance on which it was called. Although this method does not return an [IDBRequest](#idbrequest) object, the index creation itself is processed as an asynchronous request within the .

    In some implementations it is possible for the implementation to asynchronously run into problems creating the index after the createIndex method has returned. For example in implementations where metadata about the newly created index is queued up to be inserted into the database asynchronously, or where the implementation might need to ask the user for permission for quota reasons. Such implementations must still create and return an [IDBIndex](#idbindex) object, and once the implementation determines that creating the index has failed, it must run the steps to abort a transaction using an appropriate error as error. For example if creating the failed due to quota reasons, a “[QuotaExceededError](https://heycam.github.io/webidl/#quotaexceedederror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException) must be used as error and if the index can’t be created due to unique flag constraints, a “[ConstraintError](https://heycam.github.io/webidl/#constrainterror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException) must be used as error.

    The asynchronous creation of indexes is observable in the following example:

    1. const request1 = objectStore.put({name: "betty"}, 1);
    2. const request2 = objectStore.put({name: "betty"}, 2);
    3. const index = objectStore.createIndex("by_name", "name", {unique: true});

    At the point where [createIndex()](#dom-idbobjectstore-createindex) called, neither of the requests have executed. When the second request executes, a duplicate name is created. Since the index creation is considered an asynchronous , the index’s uniqueness constraint does not cause the second to fail. Instead, the transaction will be when the index is created and the constraint fails.

    The index(name) method, when invoked, must run these steps:

    1. Let transaction be this‘s .

    2. Let store be this‘s .

    3. If store has been deleted, throw an “[InvalidStateError](https://heycam.github.io/webidl/#invalidstateerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    4. If transaction’s is finished, then an “[InvalidStateError](https://heycam.github.io/webidl/#invalidstateerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    5. Let index be the index name in this‘s if one exists, or throw a “[NotFoundError](https://heycam.github.io/webidl/#notfounderror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException) otherwise.

    6. Return an associated with index and this.

    Each call to this method on the same [IDBObjectStore](#idbobjectstore) instance with the same name returns the same [IDBIndex](#idbindex) instance.

    The returned [IDBIndex](#idbindex) instance is specific to this [IDBObjectStore](#idbobjectstore) instance. If this method is called on a different [IDBObjectStore](#idbobjectstore) instance with the same name, a different [IDBIndex](#idbindex) instance is returned.

    The deleteIndex(name) method, when invoked, must run these steps:

    1. Let transaction be ‘s transaction.

    2. Let store be ‘s object store.

    3. If transaction is not an , throw an “[InvalidStateError](https://heycam.github.io/webidl/#invalidstateerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    4. If store has been deleted, an “[InvalidStateError](https://heycam.github.io/webidl/#invalidstateerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    5. If transaction’s state is not , then throw a “[TransactionInactiveError](https://heycam.github.io/webidl/#transactioninactiveerror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException).

    6. Let index be the named name in store if one exists, or a “[NotFoundError](https://heycam.github.io/webidl/#notfounderror)[DOMException](https://heycam.github.io/webidl/#idl-DOMException) otherwise.

    7. Remove index from this‘s .

    8. Destroy index.

    This method destroys the index with the given name in the . Note that this method must only be called from within an upgrade transaction.