translating queries without database connection