Is a database library for JavaScript, enabling saving data in the browser, on the machine itself and working with actual DBMS.
find()
const found = await db.vocabulary
.find({
selector: {
word: {
$eq: 'hallo',
},
},
})
.exec()
findOne()
Returns a single document
get()
When returned a single document, get()
can be used to retrieve certain values from it:
await db.vocabulary
.findOne()
.exec()
.then((docs) => {
console.log('docs')
console.log(docs)
console.log('The word: ', docs.get('word'))
})