diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-10-18 09:44:37 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-10-18 14:11:11 -0400 |
commit | f4214975a7deb5e13f8b6cf21e39697821396a7f (patch) | |
tree | f4c3f6480812e12f8d833aed892b195349b18fed /lib/sqlalchemy/orm/decl_api.py | |
parent | 665c94cc2f0340735515c4f4477e11b556d2bcd8 (diff) | |
download | sqlalchemy-f4214975a7deb5e13f8b6cf21e39697821396a7f.tar.gz |
further qualify pyodbc setinputsizes types for long stirngs
Fixed regression caused by SQL Server pyodbc change :ticket:`8177` where we
now use ``setinputsizes()`` by default; for VARCHAR, this fails if the
character size is greater than 4000 (or 2000, depending on data) characters
as the incoming datatype is NVARCHAR, which has a limit of 4000 characters,
despite the fact that VARCHAR can handle unlimited characters. Additional
pyodbc-specific typing information is now passed to ``setinputsizes()``
when the datatype's size is > 2000 characters. The change is also applied
to the :class:`.JSON` type which was also impacted by this issue for large
JSON serializations.
Fixes: #8661
Change-Id: I07fa873e95dbd2c94f3d286e93e8b3229c3a9807
Diffstat (limited to 'lib/sqlalchemy/orm/decl_api.py')
0 files changed, 0 insertions, 0 deletions