base.py 文件源码

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

项目:Flask_Blog 作者: sugarguo 项目源码 文件源码
def visit_create_index(self, create):
        index = create.element
        self._verify_index_table(index)
        preparer = self.preparer
        text = "CREATE "
        if index.unique:
            text += "UNIQUE "
        if index.dialect_options['oracle']['bitmap']:
            text += "BITMAP "
        text += "INDEX %s ON %s (%s)" % (
            self._prepared_index_name(index, include_schema=True),
            preparer.format_table(index.table, use_schema=True),
            ', '.join(
                self.sql_compiler.process(
                    expr,
                    include_table=False, literal_binds=True)
                for expr in index.expressions)
        )
        if index.dialect_options['oracle']['compress'] is not False:
            if index.dialect_options['oracle']['compress'] is True:
                text += " COMPRESS"
            else:
                text += " COMPRESS %d" % (
                    index.dialect_options['oracle']['compress']
                )
        return text
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号