created pool for sqlite connections, add some cases and fix a bug on queryToSql for qlookup