IndexedDB Domain
Methods
IndexedDB.clearObjectStore #
Clears all entries from an object store.
Parameters
securityOriginOptional
stringAt least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
storageKeyOptional
stringStorage key.
storageBucketOptional
Storage bucket. If not specified, it uses the default bucket.
databaseName stringDatabase name.
objectStoreName stringObject store name.
IndexedDB.deleteDatabase #
Deletes a database.
Parameters
securityOriginOptional
stringAt least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
storageKeyOptional
stringStorage key.
storageBucketOptional
Storage bucket. If not specified, it uses the default bucket.
databaseName stringDatabase name.
IndexedDB.deleteObjectStoreEntries #
Delete a range of entries from an object store
Parameters
securityOriginOptional
stringAt least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
storageKeyOptional
stringStorage key.
storageBucketOptional
Storage bucket. If not specified, it uses the default bucket.
databaseName stringobjectStoreName stringkeyRange Range of entry keys to delete
IndexedDB.getMetadata #
Gets metadata of an object store.
Parameters
securityOriginOptional
stringAt least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
storageKeyOptional
stringStorage key.
storageBucketOptional
Storage bucket. If not specified, it uses the default bucket.
databaseName stringDatabase name.
objectStoreName stringObject store name.
Return object
entriesCount numberthe entries count
keyGeneratorValue numberthe current value of key generator, to become the next inserted key into the object store. Valid if objectStore.autoIncrement is true.
IndexedDB.requestData #
Requests data from object store or index.
Parameters
securityOriginOptional
stringAt least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
storageKeyOptional
stringStorage key.
storageBucketOptional
Storage bucket. If not specified, it uses the default bucket.
databaseName stringDatabase name.
objectStoreName stringObject store name.
indexNameOptional
stringIndex name. If not specified, it performs an object store data request.
skipCount integerNumber of records to skip.
pageSize integerNumber of records to fetch.
keyRangeOptional
Key range.
Return object
objectStoreDataEntries array[ DataEntry ]Array of object store data entries.
hasMore booleanIf true, there are more entries to fetch in the given range.
IndexedDB.requestDatabase #
Requests database with given name in given frame.
Parameters
securityOriginOptional
stringAt least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
storageKeyOptional
stringStorage key.
storageBucketOptional
Storage bucket. If not specified, it uses the default bucket.
databaseName stringDatabase name.
Return object
databaseWithObjectStores Database with an array of object stores.
IndexedDB.requestDatabaseNames #
Requests database names for given security origin.
Parameters
securityOriginOptional
stringAt least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
storageKeyOptional
stringStorage key.
storageBucketOptional
Storage bucket. If not specified, it uses the default bucket.
Return object
databaseNames array[ string ]Database names for origin.
Types
IndexedDB.DatabaseWithObjectStores #
Database with an array of object stores.
Type: object
Properties
name stringDatabase name.
version numberDatabase version (type is not 'integer', as the standard requires the version number to be 'unsigned long long')
objectStores array[ ObjectStore ]Object stores in this database.
IndexedDB.DataEntry #
Data entry.
Type: object
Properties
key Key object.
primaryKey Primary key object.
value Value object.
IndexedDB.Key #
Key.
Type: object
Properties
type stringKey type.
Allowed values: number, string, date, array
numberOptional
numberNumber value.
stringOptional
stringString value.
dateOptional
numberDate value.
arrayOptional
array[ Key ]Array value.
IndexedDB.KeyPath #
Key path.
Type: object
Properties
type stringKey path type.
Allowed values: null, string, array
stringOptional
stringString value.
arrayOptional
array[ string ]Array value.
IndexedDB.KeyRange #
Key range.
Type: object
Properties
lowerOptional
Lower bound.
upperOptional
Upper bound.
lowerOpen booleanIf true lower bound is open.
upperOpen booleanIf true upper bound is open.
IndexedDB.ObjectStore #
Object store.
Type: object
Properties
name stringObject store name.
keyPath Object store key path.
autoIncrement booleanIf true, object store has auto increment flag set.
indexes array[ ObjectStoreIndex ]Indexes in this object store.