← Back to IndexedDB domain

IndexedDB.requestData

Requests data from object store or index.

Domain: IndexedDB experimental

Parameters

NameTypeDescription
securityOrigin (optional)stringAt least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
storageKey (optional)stringStorage key.
storageBucket (optional)Storage.StorageBucketStorage bucket. If not specified, it uses the default bucket.
databaseNamestringDatabase name.
objectStoreNamestringObject store name.
indexName (optional)stringIndex name. If not specified, it performs an object store data request.
skipCountintegerNumber of records to skip.
pageSizeintegerNumber of records to fetch.
keyRange (optional)KeyRangeKey range.

Returns

NameTypeDescription
objectStoreDataEntriesarrayArray of object store data entries.
hasMorebooleanIf true, there are more entries to fetch in the given range.

Example Request

{
  "id": 1,
  "method": "IndexedDB.requestData",
  "params": {
    "databaseName": "databaseName-value",
    "objectStoreName": "objectStoreName-value",
    "skipCount": 1,
    "pageSize": 1
  }
}

Example Response

{
  "id": 1,
  "result": {
    "objectStoreDataEntries": [],
    "hasMore": true
  }
}

Usage in Node.js

const result = await send('IndexedDB.requestData', {"databaseName": "databaseName-value", "objectStoreName": "objectStoreName-value", "skipCount": 1, "pageSize": 1});
console.log(result);
// {"objectStoreDataEntries": [], "hasMore": true}