Query method generate generator.