-
Notifications
You must be signed in to change notification settings - Fork 0
objectStore
Kristof degrave edited this page Apr 12, 2017
·
1 revision
The objectStore function opens an object store in the indexeddb database.
- transaction:
- A transaction or a transaction promise object
- objectStoreName
- The name of the object store you want to retrieve
The function returns a promise object with 2 callbacks
- Success callback
- The object store was retrieved successfully
- The first argument contains transaction.
- The second argument contains the object store
- Error callback
- Opening the object store failed
- The argument object contains a custom error object.
- NotFoundError
- The object store with the given name wasn't found.
- TransactionInactiveError
- You are trying to open an object store outside or on an inactive transaction.
{{ var dbpromise = linq2indexedDB.core.db("name", 1); var transactionPromise = linq2indexedDB.core.transaction(dbpromise, "objectstore"); linq2indexedDB.core.objectStore(transactionPromise, "objectstore").then(success, error); function success(args){ var transaction= args0; var objectstore= args1; } function error(args){ var error= args; } }}