I'm using the official page example from Table.where() documentation page:
db.friends.where({name: "David", age: 43}).first(friend => {
console.log("Found David, 43: " + JSON.stringify(friend));
}).catch(error => {
console.error(error.stack || error);
});
It simply doesn't work. It can't find the "first" method.
It returns a WhereClause
.
it should return a Collection
.
It applies to version 2.x only. Documentation mentions that but only in a comment. I updated the docs now to be more clear.
I can recommend to start using dexie@^2.0.0-beta.10 as it has been out for a while.
npm i dexie@next --save