Complete QueryExecutor class