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
String types have an optional length field, but for DDL in Db2, CHAR/VARCHAR/etc require a length be specified. The docs say that in that case an exception should be raised, but we currently do not do this and instead just assume the user passed a valid length and insert it in to the statement, which causes an SQL parser error: SQL0104 - Token ( was not valid.
https://docs.sqlalchemy.org/en/14/core/type_basics.html#sqlalchemy.types.String.params.length
String types have an optional length field, but for DDL in Db2, CHAR/VARCHAR/etc require a length be specified. The docs say that in that case an exception should be raised, but we currently do not do this and instead just assume the user passed a valid length and insert it in to the statement, which causes an SQL parser error:
SQL0104 - Token ( was not valid.
We need to add code similar to https://github.com/sqlalchemy/sqlalchemy/blob/rel_1_3/lib/sqlalchemy/dialects/mysql/base.py#L2214-L2220 for all
visit_VARCHAR
,visit_CHAR
,visit_VARGRAPHIC
, andvisit_GRAPHIC
. CLOB types do not require a length specified, however so we could actually adjust the code for them to let the database pick the default in that case.Affected code is at https://github.com/IBM/sqlalchemy-ibmi/blob/master/sqlalchemy_ibmi/base.py#L292-L322
The text was updated successfully, but these errors were encountered: