Skip to content

Ff153 Add IDBRecord#44540

Open
hamishwillee wants to merge 2 commits into
mdn:mainfrom
hamishwillee:ff153idbrecord
Open

Ff153 Add IDBRecord#44540
hamishwillee wants to merge 2 commits into
mdn:mainfrom
hamishwillee:ff153idbrecord

Conversation

@hamishwillee

Copy link
Copy Markdown
Collaborator

FF153 Adds support for IDBIndex.getAllRecords() and IDBIndex.getAllRecords().

Like all read-write methods in IDB these return and IDBRequest instance, which on success include the "result" of the request in the results object. For these methods the result is an array of IDBRecord objects.

The IDBRecord is in the IDL as an interface. It is more like a dictionary, but in line with MDN policy I've added it as its own interface and cross linked everywhere.

There are a couple of comments inline.

Related docs can be tracked in #44449

@hamishwillee hamishwillee requested review from a team as code owners June 22, 2026 05:09
@hamishwillee hamishwillee requested review from dipikabh and removed request for a team June 22, 2026 05:09
@github-actions github-actions Bot added Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed labels Jun 22, 2026
If the operation is successful, the value of the request's {{domxref("IDBRequest.result", "result")}} property is an {{jsxref("Array", "array")}} of {{domxref("IDBRecord")}} instances representing all the records that match the given query, up to the number specified by `count` (if provided).

Each object contains the following properties:
Each {{domxref("IDBRecord")}} instance contains the following properties:

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI I was going to remove the property values below and in the corresponding store method.
However it is useful to list them because in the object strore case they are the same - the store ONLY has the primary key, so this is duplicated in the key field.

Comment on lines +13 to +14
The value depends on the request that was made.
For example, the {{domxref("IDBObjectStore.getAllRecords()")}} and {{domxref("IDBIndex.getAllRecords()")}} methods populate this property with an array of {{domxref("IDBRecord")}} instances on successful completion of the request.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI If I ever have to do more work here, my intent is to build out this as a list for the different types.

@github-actions

Copy link
Copy Markdown
Contributor

@hamishwillee hamishwillee changed the title Ff153idbrecord Ff153 Add IDBRecord Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants