You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pack fail with big number with argument out of range #27
This is btw not just some ORM problem. I've just run into the same problem with raw SQL and had to transform the numbers into strings first:
File "/Users/hynek/Work/mailbox-usage-svc/src/mailbox_usage_svc/adapters/repositories.py", line 70, in update_mailbox
self.cursor.execute(
File "/Users/hynek/Work/mailbox-usage-svc/.venv/lib/python3.12/site-packages/sqlanydb.py", line 840, in execute
self.executemany(operation, [parameters])
File "/Users/hynek/Work/mailbox-usage-svc/.venv/lib/python3.12/site-packages/sqlanydb.py", line 814, in executemany
parms = [bind(k, col)
^^^^^^^^^^^^
File "/Users/hynek/Work/mailbox-usage-svc/.venv/lib/python3.12/site-packages/sqlanydb.py", line 803, in bind
(self.assign)(param, col)
File "/Users/hynek/Work/mailbox-usage-svc/.venv/lib/python3.12/site-packages/sqlanydb.py", line 437, in assign
buffer = create_string_buffer(pack(fmt, value))
^^^^^^^^^^^^^^^^^
struct.error: 'i' format requires -2147483648 <= number <= 2147483647
The type of the field is bigint.
@DanCummins-SAP any chance of this being addressed? Not being able to insert big numbers into a database is kinda big deal.
Activity
EDRossi commentedon Sep 23, 2022
i tryed to use bigint ending with the same result
hynek commentedon Feb 12, 2024
This is btw not just some ORM problem. I've just run into the same problem with raw SQL and had to transform the numbers into strings first:
The type of the field is
bigint.@DanCummins-SAP any chance of this being addressed? Not being able to insert big numbers into a database is kinda big deal.
DanCummins-SAP commentedon Feb 15, 2024
Hi Hynek,
Thanks for the report, we have added it to our backlog.
Dan
hynek commentedon Mar 12, 2024
This is fixed in 1.0.14.