Determine which database hit came from and pass this database to customization functions.

The purpose of this feature is to resolve the problem mentioned here:
https://groups.google.com/forum/#!topic/sequenceserver/nY0bU-lKm-Y