Search code examples
pythonintegerbigintasyncpgaiogram

How convert int to BigInteger (Python)


How do I convert int to BigInteger in Python?

I can't find anything like this on the net for python. I need to convert int to BigInteger in order to compare via Sqlalchemy ORM with the value in the database (telegram_id are registered via models with the bigint type)

error:

asyncpg.exceptions.UndefinedFunctionError: operator does not exist: bigint !~~* unknown
HINT:  No operator matches the given name and argument types. You might need to add explicit type casts.

Solution

  • The "BigInteger" in python is called "long". You might want to checkout this post.

    (I would have answered as a comment since this is not really a solution but I can't comment yet because of my low reputation)