__init__.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:boartty 作者: openstack 项目源码 文件源码
def parse(self, data):
        self.parser.username = self.username
        result = self.parser.parse(data, lexer=self.lexer)
        tables = self.findTables(result)
        if boartty.db.project_table in tables:
            result = and_(boartty.db.story_table.c.project_key == boartty.db.project_table.c.key,
                          result)
            tables.remove(boartty.db.project_table)
        if boartty.db.tag_table in tables:
            result = and_(boartty.db.story_tag_table.c.tag_key == boartty.db.tag_table.c.key,
                          boartty.db.story_tag_table.c.story_key == boartty.db.story_table.c.key,
                          result)
            tables.remove(boartty.db.tag_table)
        if boartty.db.user_table in tables:
            result = and_(boartty.db.story_table.c.user_key == boartty.db.user_table.c.key,
                          result)
            tables.remove(boartty.db.user_table)
        #if boartty.db.file_table in tables:
        #    result = and_(boartty.db.file_table.c.revision_key == boartty.db.revision_table.c.key,
        #                  boartty.db.revision_table.c.story_key == boartty.db.story_table.c.key,
        #                  result)
        #    tables.remove(boartty.db.file_table)
        if tables:
            raise Exception("Unknown table in search: %s" % tables)
        return result
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号