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'
BIGINT
class BIGINT(BigInteger):
"""The SQL BIGINT type."""
__visit_name__ = 'BIGINT'
But Column(BigInteger) and Column(BIGINT) can both work, both define a bigint in postgresql. How to distinguish them?
They both work, but the BIGINT
has to be imported from a specific dialect, eg postgres in your case. If you change your database to eg. mysql, you might have problems. With BigInteger
sqlalchemy with take care of the mapping, depending on the database you are using, so you should prefer this one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With