documentation on how to write a new DB adapter