IndexedDB Domain
Methods
IndexedDB.clearObjectStore #
Clears all entries from an object store.
Parameters
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 bucket. If not specified, it uses the default bucket.
databaseName
string
Database name.
objectStoreName
string
Object store name.
IndexedDB.deleteDatabase #
Deletes a database.
Parameters
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 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
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 bucket. If not specified, it uses the default bucket.
databaseName
string
objectStoreName
string
keyRange
Range of entry keys to delete
IndexedDB.getMetadata #
Gets metadata of an object store.
Parameters
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 bucket. If not specified, it uses the default bucket.
databaseName
string
Database name.
objectStoreName
string
Object store name.
Return object
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.requestData #
Requests data from object store or index.
Parameters
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 bucket. If not specified, it uses the default bucket.
databaseName
string
Database name.
objectStoreName
string
Object store name.
indexName
string
Index name, empty string for object store data requests.
skipCount
integer
Number of records to skip.
pageSize
integer
Number of records to fetch.
keyRange
Optional
Key range.
Return object
objectStoreDataEntries
array[ DataEntry ]
Array of object store data entries.
hasMore
boolean
If true, there are more entries to fetch in the given range.
IndexedDB.requestDatabase #
Requests database with given name in given frame.
Parameters
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 bucket. If not specified, it uses the default bucket.
databaseName
string
Database name.
Return object
databaseWithObjectStores
Database with an array of object stores.
IndexedDB.requestDatabaseNames #
Requests database names for given security origin.
Parameters
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 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
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.
IndexedDB.DataEntry #
Data entry.
Type: object
Properties
key
Key object.
primaryKey
Primary key object.
value
Value object.
IndexedDB.Key #
Key.
Type: object
Properties
type
string
Key type.
Allowed values: number
, string
, date
, array
number
Optional
number
Number value.
string
Optional
string
String value.
date
Optional
number
Date value.
array
Optional
array[ Key ]
Array value.
IndexedDB.KeyPath #
Key path.
Type: object
Properties
type
string
Key path type.
Allowed values: null
, string
, array
string
Optional
string
String value.
array
Optional
array[ string
]
Array value.
IndexedDB.KeyRange #
Key range.
Type: object
Properties
lower
Optional
Lower bound.
upper
Optional
Upper bound.
lowerOpen
boolean
If true lower bound is open.
upperOpen
boolean
If true upper bound is open.
IndexedDB.ObjectStore #
Object store.
Type: object
Properties
name
string
Object store name.
keyPath
Object store key path.
autoIncrement
boolean
If true, object store has auto increment flag set.
indexes
array[ ObjectStoreIndex ]
Indexes in this object store.