Allow restricting queries with conditions