iondbproject / iondb

IonDB, a key-value datastore for resource constrained systems.
BSD 3-Clause "New" or "Revised" License
587 stars 48 forks source link

How to get total number of stored records? #149

Closed rhaguiuda closed 1 year ago

rhaguiuda commented 1 year ago

I'm using the flat file dictionary. Is there a way to query the total number of records stored without having to create a cursor and iterate over all records?

iondbproject commented 1 year ago

The system does not maintain a count of the number of records by default. You could add a count variable to one of the data structures and maintain it when inserts/deletes occur.