Skip to content
This repository has been archived by the owner on Mar 6, 2023. It is now read-only.

method to read the data in the db without a query? #8

Closed
MichaelSowah opened this issue Oct 6, 2018 · 3 comments
Closed

method to read the data in the db without a query? #8

MichaelSowah opened this issue Oct 6, 2018 · 3 comments

Comments

@MichaelSowah
Copy link

Is there any way to get the data without a query? eg: db.get('name') to finad a particular one or db.get() to get all the data

@marioreggiori
Copy link
Owner

I am not sure if I understand you correctly. To get all data you simply use db.find({}) and if you want to search for records with a specific name then use db.find({'name': 'Michael'}) or db.first({'name': 'Michael'})- if you only need a single record.
But I don't understand how you want to get data without a query. Can you clarify the question?
If you need a simple key-value store Shared Preferences would be a better choice i guess.

@MichaelSowah
Copy link
Author

Thanks, I figured it eventually going through the docs...The library is beautiful...and sorry for the error in my questions.

@marioreggiori
Copy link
Owner

Thanks for the compliment! :)
No problem. Glad that i could help!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants