Sql wrapper

Enhancements to the sqlite library and the start of a sql driver for sqlite.