

def _parse_select_query(self, node, alias_map, conv):
    clone = node.clone()
    if (not node._explicit_selection):
        if (conv and isinstance(conv, ForeignKeyField)):
            select_field = conv.to_field
        else:
            select_field = clone.model_class._meta.primary_key
        clone._select = (select_field,)
    (sub, params) = self.generate_select(clone, alias_map)
    return (('(%s)' % strip_parens(sub)), params)

dataset/ETHPy150Open coleifer/peewee/peewee.py QueryCompiler._parse_select_query/original