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

2

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.

Maggie answered 6/2, 2019 at 10:12 Comment(0)
T
15
db.table("tableName").toArray().then( ... )
Terrazzo answered 6/2, 2019 at 12:31 Comment(0)
P
8

you can try this

const all = await db.friends.toArray()
Pagepageant answered 16/2, 2021 at 17:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.