小编Lib*_*aco的帖子

SQLAlchemy 中的 BIGINT 和 BigInteger 有什么区别?

大整数

class BigInteger(Integer):

    """A type for bigger ``int`` integers.

    Typically generates a ``BIGINT`` in DDL, and otherwise acts like
    a normal :class:`.Integer` on the Python side.

    """

    __visit_name__ = 'big_integer'
Run Code Online (Sandbox Code Playgroud)

大数据

class BIGINT(BigInteger):

    """The SQL BIGINT type."""

    __visit_name__ = 'BIGINT'
Run Code Online (Sandbox Code Playgroud)

但是 Column(BigInteger) 和 Column(BIGINT) 都可以工作,都可以在 postgresql 中定义一个 bigint。如何区分它们?

python sqlalchemy

3
推荐指数
1
解决办法
2740
查看次数

标签 统计

python ×1

sqlalchemy ×1