当前位置: 首页>>代码示例>>Python>>正文


Python mysql.LONGTEXT属性代码示例

本文整理汇总了Python中sqlalchemy.dialects.mysql.LONGTEXT属性的典型用法代码示例。如果您正苦于以下问题:Python mysql.LONGTEXT属性的具体用法?Python mysql.LONGTEXT怎么用?Python mysql.LONGTEXT使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在sqlalchemy.dialects.mysql的用法示例。


在下文中一共展示了mysql.LONGTEXT属性的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: load_dialect_impl

# 需要导入模块: from sqlalchemy.dialects import mysql [as 别名]
# 或者: from sqlalchemy.dialects.mysql import LONGTEXT [as 别名]
def load_dialect_impl(self, dialect):
        if dialect.name == 'mysql':
            return dialect.type_descriptor(mysql.LONGTEXT())
        else:
            return self.impl 
开发者ID:cloudbase,项目名称:vdi-broker,代码行数:7,代码来源:types.py

示例2: upgrade

# 需要导入模块: from sqlalchemy.dialects import mysql [as 别名]
# 或者: from sqlalchemy.dialects.mysql import LONGTEXT [as 别名]
def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.add_column('documents', sa.Column('raw_calais', mysql.LONGTEXT(), nullable=True))
    ### end Alembic commands ### 
开发者ID:Code4SA,项目名称:mma-dexter,代码行数:6,代码来源:3e64188fb918_raw_calais.py

示例3: load_dialect_impl

# 需要导入模块: from sqlalchemy.dialects import mysql [as 别名]
# 或者: from sqlalchemy.dialects.mysql import LONGTEXT [as 别名]
def load_dialect_impl(self, dialect):
        if dialect.name == "mysql":
            return dialect.type_descriptor(
                LONGTEXT(charset="utf8mb4", collation="utf8mb4_unicode_ci")
            )
        else:
            return dialect.type_descriptor(Text()) 
开发者ID:quay,项目名称:quay,代码行数:9,代码来源:__init__.py

示例4: upgrade

# 需要导入模块: from sqlalchemy.dialects import mysql [as 别名]
# 或者: from sqlalchemy.dialects.mysql import LONGTEXT [as 别名]
def upgrade():
    bind = op.get_bind()
    engine = bind.engine
    if engine.name == 'mysql':
        op.alter_column('atomdetails', 'results', type_=mysql.LONGTEXT,
                        existing_nullable=True) 
开发者ID:openstack,项目名称:taskflow,代码行数:8,代码来源:0bc3e1a3c135_set_result_meduimtext_type.py

示例5: __init__

# 需要导入模块: from sqlalchemy.dialects import mysql [as 别名]
# 或者: from sqlalchemy.dialects.mysql import LONGTEXT [as 别名]
def __init__(self, mysql_as_long=False, mysql_as_medium=False):
        """Initialize JSON-encoding type."""
        super(JsonEncodedType, self).__init__()

        if mysql_as_long and mysql_as_medium:
            raise TypeError("mysql_as_long and mysql_as_medium are mutually "
                            "exclusive")

        if mysql_as_long:
            self.impl = Text().with_variant(mysql.LONGTEXT(), 'mysql')
        elif mysql_as_medium:
            self.impl = Text().with_variant(mysql.MEDIUMTEXT(), 'mysql') 
开发者ID:openstack,项目名称:oslo.db,代码行数:14,代码来源:types.py

示例6: upgrade_development

# 需要导入模块: from sqlalchemy.dialects import mysql [as 别名]
# 或者: from sqlalchemy.dialects.mysql import LONGTEXT [as 别名]
def upgrade_development():
    ### commands auto generated by Alembic - please adjust! ###
    op.add_column('posts', sa.Column('comment_data', mysql.LONGTEXT(), nullable=True))
    op.add_column('posts', sa.Column('comments_queried_at', sa.DateTime(), nullable=True))
    op.add_column('posts', sa.Column('created_at', sa.DateTime(), nullable=True))
    ### end Alembic commands ### 
开发者ID:mitmedialab,项目名称:CivilServant,代码行数:8,代码来源:2e09867c0c38_add_comment_data_to_post.py

示例7: upgrade_test

# 需要导入模块: from sqlalchemy.dialects import mysql [as 别名]
# 或者: from sqlalchemy.dialects.mysql import LONGTEXT [as 别名]
def upgrade_test():
    ### commands auto generated by Alembic - please adjust! ###
    op.add_column('posts', sa.Column('comment_data', mysql.LONGTEXT(), nullable=True))
    op.add_column('posts', sa.Column('comments_queried_at', sa.DateTime(), nullable=True))
    op.add_column('posts', sa.Column('created_at', sa.DateTime(), nullable=True))
    ### end Alembic commands ### 
开发者ID:mitmedialab,项目名称:CivilServant,代码行数:8,代码来源:2e09867c0c38_add_comment_data_to_post.py

示例8: upgrade_production

# 需要导入模块: from sqlalchemy.dialects import mysql [as 别名]
# 或者: from sqlalchemy.dialects.mysql import LONGTEXT [as 别名]
def upgrade_production():
    ### commands auto generated by Alembic - please adjust! ###
    op.add_column('posts', sa.Column('comment_data', mysql.LONGTEXT(), nullable=True))
    op.add_column('posts', sa.Column('comments_queried_at', sa.DateTime(), nullable=True))
    op.add_column('posts', sa.Column('created_at', sa.DateTime(), nullable=True))
    ### end Alembic commands ### 
开发者ID:mitmedialab,项目名称:CivilServant,代码行数:8,代码来源:2e09867c0c38_add_comment_data_to_post.py

示例9: LongText

# 需要导入模块: from sqlalchemy.dialects import mysql [as 别名]
# 或者: from sqlalchemy.dialects.mysql import LONGTEXT [as 别名]
def LongText():
    # TODO(rakhmerov): Need to do for postgres.
    return sa.Text().with_variant(mysql.LONGTEXT(), 'mysql') 
开发者ID:openstack,项目名称:qinling,代码行数:5,代码来源:types.py

示例10: upgrade

# 需要导入模块: from sqlalchemy.dialects import mysql [as 别名]
# 或者: from sqlalchemy.dialects.mysql import LONGTEXT [as 别名]
def upgrade():
    op.add_column('event', sa.Column('_description', mysql.LONGTEXT(),
                                     nullable=True)) 
开发者ID:nylas,项目名称:sync-engine,代码行数:5,代码来源:179_longer_event_descriptions.py

示例11: downgrade

# 需要导入模块: from sqlalchemy.dialects import mysql [as 别名]
# 或者: from sqlalchemy.dialects.mysql import LONGTEXT [as 别名]
def downgrade():
    op.drop_index('ix_transaction_public_id', table_name='transaction')
    op.drop_column('transaction', 'public_id')
    op.drop_column('transaction', 'object_public_id')
    op.add_column('transaction', sa.Column(u'additional_data',
                                           mysql.LONGTEXT(), nullable=True))
    op.drop_column('transaction', 'public_snapshot')
    op.drop_column('transaction', 'private_snapshot') 
开发者ID:nylas,项目名称:sync-engine,代码行数:10,代码来源:038_add_public_ids_to_transactions.py


注:本文中的sqlalchemy.dialects.mysql.LONGTEXT属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。