implementation based on SQLite PCL