Fun fact, ipv6 addresses are bigger than BigInts.
Conversation
Replying to
My concept of a bigint is like 4096 bits (RSA) so I guess you mean some really small bigint. 😜
1
1
1
SQLite only has a single INTEGER type encoding 64-bit integers as a variable length integer.
sqlite.org/datatype3.html
Columns in SQLite have a preferred storage format (affinity) rather than types.
sqlite.org/datatype3.html
BIGINT is one of many aliases for INTEGER affinity.
Yes, that is a long winded way of saying what I said, thanks.
1
I'm clarifying for that BIGINT is part of SQLite's compatibility cruft for column type names. It doesn't have a BIGINT type and they inherited those alias names as cruft from every other mainstream database. It's worth reading what I linked to see what a mess that is.
1
2
Show replies
This Tweet was deleted by the Tweet author. Learn more
Yeah it's abstracted away from me by sqlalchemy, which I assume correctly takes it's BigInteger type and creates an Integer field if the engine is sqlite.
The aliases only exist for compatibility with other databases. I don't think it's a good practice to use them when targeting SQLite.
It's possible to enforce types with a constraint like CHECK (typeof(column_name) = 'integer') though. I get tempted to add that for most columns.


