Enable use of custom QueryEngine class
Proper transaction control
Fix cursor in sqlite fallback