Controls what get and related methods do when a key is not found.
See the DBEnv set_get_returns_none documentation.
The previous setting is returned.
Return a dictionary containing database statistics with the following keys.
For Hash databases:
magic Magic number that identifies the file as a Hash database. version Version of the Hash database. nkeys Number of unique keys in the database. ndata Number of key/data pairs in the database. pagecnt The number of pages in the database. pagesize Underlying Hash database page (& bucket) size. nelem Estimated size of the hash table specified at database creation time. ffactor Desired fill factor (number of items per bucket) specified at database creation time. buckets Number of hash buckets. free Number of pages on the free list. bfree Number of bytes free on bucket pages. bigpages Number of big key/data pages. big_bfree Number of bytes free on big item pages. overflows Number of overflow pages (overflow pages are pages that contain items that did not fit in the main bucket page). ovfl_free Number of bytes free on overflow pages. dup Number of duplicate pages. dup_free Number of bytes free on duplicate pages.
For BTree and Recno databases:
magic Magic number that identifies the file as a Btree database. version Version of the Btree database. nkeys For the Btree Access Method, the number of unique keys in the database.
For the Recno Access Method, the number of records in the database. If the database has been configured to not re-number records during deletion, the number of records may include records that have been deleted.
ndata For the Btree Access Method, the number of key/data pairs in the database.
For the Recno Access Method, the number of records in the database. If the database has been configured to not re-number records during deletion, the number of records may include records that have been deleted.
pagecnt The number of pages in the database. pagesize Underlying database page size. minkey Minimum keys per page. re_len Length of fixed-length records. re_pad Padding byte value for fixed-length records. levels Number of levels in the database. int_pg Number of database internal pages. leaf_pg Number of database leaf pages. dup_pg Number of database duplicate pages. over_pg Number of database overflow pages. empty_pg Number of empty database pages. free Number of pages on the free list. int_pgfree Num of bytes free in database internal pages. leaf_pgfree Number of bytes free in database leaf pages. dup_pgfree Num bytes free in database duplicate pages. over_pgfree Num of bytes free in database overflow pages.
For Queue databases:
magic Magic number that identifies the file as a Queue database. version Version of the Queue file type. nkeys Number of records in the database. ndata Number of records in the database. pagesize Underlying database page size. extentsize Underlying database extent size, in pages. pages Number of pages in the database. re_len Length of the records. re_pad Padding byte value for the records. pgfree Number of bytes free in database pages. first_recno First undeleted record in the database. cur_recno Last allocated record number in the database.
These methods of the DB type are for implementing the Mapping Interface, as well as others for making a DB behave as much like a dictionary as possible. The main downside to using a DB as a dictionary is you are not able to specify a transaction object.