I open a lmdb
database using this code:
lmdb_env = lmdb.open(source_path, readonly=True)
How can I count the number of records in this database?
I open a lmdb
database using this code:
lmdb_env = lmdb.open(source_path, readonly=True)
How can I count the number of records in this database?
You can use
event.stat()
. It will return the following dictionary withentries
detailing the number of records in this database:I think it should be like this:
Then it prints the directory that Jaco pasted here.
I found a simple solution using
for
loop. Here it is:However, I think there should be a better way using pre-defined function.