moved all squel code into the mysql adapter (#2)
general refactoring