Test if tinyDB is empty

To see if tinyDB is empty I found the following procedure

But in my case it always shows “list is empty” even if I have filled the db.

What if you try this. This is looking if your TinyDB is completely empty. So no tags at all.


The problem is that the tag “storeparsedData” is just a tag that may or may not exist. You are just asking if that tag exists. If the TinyDB is full of data but that tag doesn’t exist, you’ll still get a false and an empty list.

1 Like

Yes, but as this example was presented in stackoverflow.com I thought that “storeparsedData” has a special meaning and is present in each tinyDB.

No, it's not. It's just another tag. There's no special tags in TinyDB. So the developer who made that app, probably updated that tag somewhere else every time the TinyDB was used. Do what @Peter suggested above.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.