Support for multiple databases should be implemented as a parallel layer checked together after a key is checked out.
There are several options that needs to be explored:
a 1 byte can be appended or prepended to the key to indicate the database number, in this way the hashtable internally would always compare the key including the database number
the database number should also be stored in the storage db entry index structure
every storage_dbop* should request the database number
the database number should be stored in the connection context
the max number of database should be configurable
the initial database number should be configurable
Support for multiple databases should be implemented as a parallel layer checked together after a key is checked out.
There are several options that needs to be explored: