def create_query(self, attr):
field = attr[<NUM_LIT:0>]<EOL>operator = attr[<NUM_LIT:1>]<EOL>value = attr[<NUM_LIT:2>]<EOL>model = self.model<EOL>if '<STR_LIT:.>' in field:<EOL><INDENT>field_items = field.split('<STR_LIT:.>')<EOL>field_name = getattr(model, field_items[<NUM_LIT:0>], None)<EOL>class_name = field_name.property.mapper.class_<EOL>new_model = getattr(class_name, field_items[<NUM_LIT:1>])<EOL>return field_name.has(OPERATORS[operator](new_model, value))<EOL><DEDENT>return OPERATORS[operator](getattr(model, field, None), value)<EOL>
Mix all values and make the query