sqlite adapter and unit-tests refactored to the new API

The commit message speaks for itself