IndexedDB
ExperimentalDependencies: Runtime, Storage
No symbols match your filter.
Commands
IndexedDB.clearObjectStore
Clears all entries from an object store.
Parameters
| Name | Type | Description |
|---|---|---|
securityOrigin
(optional) |
string |
At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin. |
storageKey
(optional) |
string |
Storage key. |
storageBucket
(optional) |
Storage.StorageBucket |
Storage bucket. If not specified, it uses the default bucket. |
databaseName
|
string |
Database name. |
objectStoreName
|
string |
Object store name. |
IndexedDB.deleteDatabase
Deletes a database.
Parameters
| Name | Type | Description |
|---|---|---|
securityOrigin
(optional) |
string |
At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin. |
storageKey
(optional) |
string |
Storage key. |
storageBucket
(optional) |
Storage.StorageBucket |
Storage bucket. If not specified, it uses the default bucket. |
databaseName
|
string |
Database name. |
IndexedDB.deleteObjectStoreEntries
Delete a range of entries from an object store
Parameters
| Name | Type | Description |
|---|---|---|
securityOrigin
(optional) |
string |
At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin. |
storageKey
(optional) |
string |
Storage key. |
storageBucket
(optional) |
Storage.StorageBucket |
Storage bucket. If not specified, it uses the default bucket. |
databaseName
|
string |
|
objectStoreName
|
string |
|
keyRange
|
KeyRange |
Range of entry keys to delete |
IndexedDB.disable
Disables events from backend.
IndexedDB.enable
Enables events from backend.
IndexedDB.requestData
Requests data from object store or index.
Parameters
| Name | Type | Description |
|---|---|---|
securityOrigin
(optional) |
string |
At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin. |
storageKey
(optional) |
string |
Storage key. |
storageBucket
(optional) |
Storage.StorageBucket |
Storage bucket. If not specified, it uses the default bucket. |
databaseName
|
string |
Database name. |
objectStoreName
|
string |
Object store name. |
indexName
(optional) |
string |
Index name. If not specified, it performs an object store data request. |
skipCount
|
integer |
Number of records to skip. |
pageSize
|
integer |
Number of records to fetch. |
keyRange
(optional) |
KeyRange |
Key range. |
Return Object
| Name | Type | Description |
|---|---|---|
objectStoreDataEntries
|
array<DataEntry> |
Array of object store data entries. |
hasMore
|
boolean |
If true, there are more entries to fetch in the given range. |
IndexedDB.getMetadata
Gets metadata of an object store.
Parameters
| Name | Type | Description |
|---|---|---|
securityOrigin
(optional) |
string |
At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin. |
storageKey
(optional) |
string |
Storage key. |
storageBucket
(optional) |
Storage.StorageBucket |
Storage bucket. If not specified, it uses the default bucket. |
databaseName
|
string |
Database name. |
objectStoreName
|
string |
Object store name. |
Return Object
| Name | Type | Description |
|---|---|---|
entriesCount
|
number |
the entries count |
keyGeneratorValue
|
number |
the current value of key generator, to become the next inserted key into the object store. Valid if objectStore.autoIncrement is true. |
IndexedDB.requestDatabase
Requests database with given name in given frame.
Parameters
| Name | Type | Description |
|---|---|---|
securityOrigin
(optional) |
string |
At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin. |
storageKey
(optional) |
string |
Storage key. |
storageBucket
(optional) |
Storage.StorageBucket |
Storage bucket. If not specified, it uses the default bucket. |
databaseName
|
string |
Database name. |
Return Object
| Name | Type | Description |
|---|---|---|
databaseWithObjectStores
|
DatabaseWithObjectStores |
Database with an array of object stores. |
IndexedDB.requestDatabaseNames
Requests database names for given security origin.
Parameters
| Name | Type | Description |
|---|---|---|
securityOrigin
(optional) |
string |
At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin. |
storageKey
(optional) |
string |
Storage key. |
storageBucket
(optional) |
Storage.StorageBucket |
Storage bucket. If not specified, it uses the default bucket. |
Return Object
| Name | Type | Description |
|---|---|---|
databaseNames
|
array<string> |
Database names for origin. |
Types
DatabaseWithObjectStores
(object)
Database with an array of object stores.
Properties
| Name | Type | Description |
|---|---|---|
name
|
string |
Database name. |
version
|
number |
Database 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. |
ObjectStore
(object)
Object store.
Properties
| Name | Type | Description |
|---|---|---|
name
|
string |
Object store name. |
keyPath
|
KeyPath |
Object store key path. |
autoIncrement
|
boolean |
If true, object store has auto increment flag set. |
indexes
|
array<ObjectStoreIndex> |
Indexes in this object store. |
ObjectStoreIndex
(object)
Object store index.
Properties
| Name | Type | Description |
|---|---|---|
name
|
string |
Index name. |
keyPath
|
KeyPath |
Index key path. |
unique
|
boolean |
If true, index is unique. |
multiEntry
|
boolean |
If true, index allows multiple entries for a key. |
Key
(object)
Key.
Properties
| Name | Type | Description |
|---|---|---|
type
|
string |
Key type. |
number
(optional) |
number |
Number value. |
string
(optional) |
string |
String value. |
date
(optional) |
number |
Date value. |
array
(optional) |
array<Key> |
Array value. |
DataEntry
(object)
Data entry.
Properties
| Name | Type | Description |
|---|---|---|
key
|
Runtime.RemoteObject |
Key object. |
primaryKey
|
Runtime.RemoteObject |
Primary key object. |
value
|
Runtime.RemoteObject |
Value object. |
KeyPath
(object)
Key path.
Properties
| Name | Type | Description |
|---|---|---|
type
|
string |
Key path type. |
string
(optional) |
string |
String value. |
array
(optional) |
array<string> |
Array value. |