LongHike
LongHike

Reputation: 4460

In dexie.js how can I obtain all records from a table?

In dexie.js, is there a way to obtain all records from a table?

Currently I am using:

dbTable.filter(() => true).then( ... )

It works but I am not sure, whether it's the right way.

Upvotes: 6

Views: 10582

Answers (2)

kamrankamranifard
kamrankamranifard

Reputation: 618

you can try this

const all = await db.friends.toArray()

Upvotes: 8

David Fahlander
David Fahlander

Reputation: 5646

db.table("tableName").toArray().then( ... )

Upvotes: 15

Related Questions