當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。