base.py 文件源码

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

项目:Flask-NvRay-Blog 作者: rui7157 项目源码 文件源码
def drop(self, bind=None, checkfirst=True):
        """Emit ``DROP TYPE`` for this
        :class:`~.postgresql.ENUM`.

        If the underlying dialect does not support
        Postgresql DROP TYPE, no action is taken.

        :param bind: a connectable :class:`.Engine`,
         :class:`.Connection`, or similar object to emit
         SQL.
        :param checkfirst: if ``True``, a query against
         the PG catalog will be first performed to see
         if the type actually exists before dropping.

        """
        if not bind.dialect.supports_native_enum:
            return

        if not checkfirst or \
                bind.dialect.has_type(bind, self.name, schema=self.schema):
            bind.execute(DropEnumType(self))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号