updating api & tests in line with sqlite3 changes (wip)