6

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.

LongHike
  • 4,016
  • 4
  • 37
  • 76

2 Answers2

14
db.table("tableName").toArray().then( ... )
David Fahlander
  • 5,058
  • 1
  • 20
  • 19
7

you can try this

const all = await db.friends.toArray()