

def _parse(self, node, alias_map, conv):
    node_type = getattr(node, '_node_type', None)
    unknown = False
    if (node_type in self._parse_map):
        (sql, params) = self._parse_map[node_type](node, alias_map, conv)
        unknown = (node_type in self._unknown_types)
    elif isinstance(node, (list, tuple)):
        (sql, params) = self.parse_node_list(node, alias_map, conv)
        sql = ('(%s)' % sql)
    elif isinstance(node, Model):
        sql = params.interpolation
        if (conv and isinstance(conv, ForeignKeyField) and (not isinstance(conv.to_field, ForeignKeyField))):
            params = [conv.to_field.db_value(getattr(node, conv.to_field.name))]
        else:
            params = [node._get_pk_value()]
    elif ((isclass(node) and issubclass(node, Model)) or isinstance(node, ModelAlias)):
        entity = node.as_entity().alias(alias_map[node])
        (sql, params) = self.parse_node(entity, alias_map, conv)
    else:
        (sql, params) = self._parse_default(node, alias_map, conv)
        unknown = True
    return (sql, params, unknown)

dataset/ETHPy150Open coleifer/peewee/peewee.py QueryCompiler._parse/VarMisuse@125/158 `self`->`params`