refactor common SQLiteAdapter code to abstract module