started rewriting sqlite class, to wrap sqlite

Seperating sqlite parts to match data_pattern, which will
cause it to be sometimes un-compatable with sqlite. So instead wrap all of
sqlites public api.