5.5 KiB
IndexedDB
_Auto generated documentation for WebKit inspector
- Commands
- enable
- disable
- requestDatabaseNames
- requestDatabase
- requestData
- clearObjectStore
- Types
- DatabaseWithObjectStores
- ObjectStore
- ObjectStoreIndex
- Key
- KeyRange
- DataEntry
- KeyPath
Commands
IndexedDB.enable(callback)
Enables events from backend.
Parameters
callback ( function )
Results
error ( error )
IndexedDB.disable(callback)
Disables events from backend.
Parameters
callback ( function )
Results
error ( error )
IndexedDB.requestDatabaseNames(securityOrigin, callback)
Requests database names for given security origin.
Parameters
securityOrigin ( string )
Security origin.
callback ( function )
Results
error ( error )
databaseNames ( array )
Database names for origin.
IndexedDB.requestDatabase(securityOrigin, databaseName, callback)
Requests database with given name in given frame.
Parameters
securityOrigin ( string )
Security origin.
databaseName ( string )
Database name.
callback ( function )
Results
error ( error )
databaseWithObjectStores ( DatabaseWithObjectStores )
Database with an array of object stores.
IndexedDB.requestData(securityOrigin, databaseName, objectStoreName, indexName, skipCount, pageSize, [KeyRange], callback)
Requests data from object store or index.
Parameters
securityOrigin ( string )
Security origin.
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 KeyRange )
Key range.
callback ( function )
Results
error ( error )
objectStoreDataEntries ( array of DataEntry )
Array of object store data entries.
hasMore ( boolean )
If true, there are more entries to fetch in the given range.
IndexedDB.clearObjectStore(securityOrigin, databaseName, objectStoreName, callback)
Clears all entries from an object store.
Parameters
securityOrigin ( string )
Security origin.
databaseName ( string )
Database name.
objectStoreName ( string )
Object store name.
callback ( function )
Results
error ( error )
Types
Class: DatabaseWithObjectStores
Type: object
Database with an array of object stores.
Properties
name ( string )
Database name.
version ( number )
Database version.
objectStores ( array of ObjectStore )
Object stores in this database.
Class: ObjectStore
Type: object
Object store.
Properties
name ( string )
Object store name.
keyPath ( KeyPath )
Object store key path.
autoIncrement ( boolean )
If true, object store has auto increment flag set.
indexes ( array of ObjectStoreIndex )
Indexes in this object store.
Class: ObjectStoreIndex
Type: object
Object store index.
Properties
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.
Class: Key
Type: object
Key.
Properties
type ( string enumerated ["number","string","date","array"] )
Key type.
number ( optional number )
Number value.
string ( optional string )
String value.
date ( optional number )
Date value.
array ( optional array of Key )
Array value.
Class: KeyRange
Type: object
Key range.
Properties
lower ( optional Key )
Lower bound.
upper ( optional Key )
Upper bound.
lowerOpen ( boolean )
If true lower bound is open.
upperOpen ( boolean )
If true upper bound is open.
Class: DataEntry
Type: object
Data entry.
Properties
key ( Runtime.RemoteObject )
Key.
primaryKey ( Runtime.RemoteObject )
Primary key.
value ( Runtime.RemoteObject )
Value.
Class: KeyPath
Type: object
Key path.
Properties
type ( string enumerated ["null","string","array"] )
Key path type.
string ( optional string )
String value.
array ( optional array )
Array value.