Bork bork bork

Minimal changes to DatabaseAdapter and DatabaseIndex