That's for CHAR not NCHAR. I will open a bug report.
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See http://stackoverflow.com/help/mcve for a full desc
On Fri, Oct 11, 2019, at 3:56 PM, Victor Olex wrote:
> A bit of advocacy from my side on cx_Oracle:
> https://github.com/oracle/python-cx_Oracle/issues/365
>
> Mike, there's something you might want to look at. We have this monkey patch
> on SQLAlchemy in our recent code, which was necessary t
A bit of advocacy from my side on cx_Oracle:
https://github.com/oracle/python-cx_Oracle/issues/365
Mike, there's something you might want to look at. We have this monkey
patch on SQLAlchemy in our recent code, which was necessary to get the
correct behavior for NCHAR columns.
from sqlalchemy.d
With cx_Oracle, you really should likely be using typing for everything as
cx_Oracle is pretty sensitive as well to the cursor.setinputsizes() settings,
which SQLAlchemy will do for you if you send in typed bound parameters;
additionally, you can set typing information for result columns also (u
hey there -
you should apply typing behavior which should be safe to apply to any CHAR like
this:
class PaddedChar(TypeDecorator):
impl = NCHAR
def process_bind_param(self, value, dialect):
if value is not None:
value = value + (" " * (self.impl.length - len(value)))
return value
result
Hi everyone,
There's IMO unusual behavior in Oracle when using bound parameters on NCHAR
column.
from sqlalchemy import create_engine
from sqlalchemy.sql import text
e = create_engine('oracle://chinook:p4ssw0rd@localhost/xe')
result = e.execute(
text("select * from nchartable where id