[cx-oracle-users] type object matching - BINARY
Brought to you by:
atuining
From: Mario F. <mf...@zo...> - 2006-09-13 12:45:09
|
I've a question about this behaviour: >>> cx_Oracle.BINARY == cx_Oracle.BINARY True >>> cx_Oracle.BINARY == cx_Oracle.LOB False >>> cx_Oracle.BINARY == cx_Oracle.BLOB False >>> cx_Oracle.BINARY == cx_Oracle.CLOB False is it correct? after reading the pep-249 at http://www.python.org/dev/peps/pep-0249/, I would expect all of them to check True. otherwise, how do I check if a field is holding a binary object in a db-api2 compatible way? I've checked pgdb and MySQLdb and only MySQLdb recognizes a binary object as above. how to test: import cx_Oracle, open a connection, associate cr to a cursor. >>> cr.execute('create table test(pk_test integer not null primary key, v_text clob)') >>> cr.execute('select * from test') [<cx_Oracle.NUMBER object at 0x40344ca0>, <cx_Oracle.CLOB object at 0x40311bd0>] >>> cr.description[1][1] <type 'cx_Oracle.CLOB'> >>> cr.description[1][1] == cx_Oracle.BINARY False >>> regards, MF |