'Attempt to parse a ORM-based filter.
Using SQLAlchemy, this would yield a sql.elements.BinaryExpression.'

def _parse_orm_filter(self, attr, op, val):

    column_map = self.orm_filter_parsers.get(attr, None)
    if (not column_map):
        return None
    if ('column' in column_map):
        attr = column_map['column']
    column = self.model_class.table.columns.get(attr)
    if (column is None):
        column = getattr(self.model_class, attr)
    if (column is None):
        return None
    allowed_ops = column_map.get('op')
    if (op not in allowed_ops):
        return None
    op = self._convert_op_string_to_fn(column, op)
    if (not op):
        return None
    val_parser = column_map.get('val', None)
    if val_parser:
        val = val_parser(val)
    orm_filter = op(val)
    return orm_filter
