Skip to content

Commit f3f0e76

Browse files
committed
In order to support a <null> type column being returned from
engine. A TypeObject is needed instead of returning None. As None is used to verify that the type returned is in the TYPEMAP. cursor.execute('select NULL from DUAL') fails without this change. I don't know how TypeObject is used an rather there is a side-effect by using TypeObject(None) and any use of TypeObject.
1 parent cdd32ab commit f3f0e76

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pynuodb/datatype.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,9 @@ def __cmp__(self, other):
154154
NUMBER = TypeObject(int, decimal.Decimal)
155155
DATETIME = TypeObject(Timestamp, Date, Time)
156156
ROWID = TypeObject()
157+
NULL = TypeObject(None)
157158

158-
TYPEMAP = {"<null>": None,
159+
TYPEMAP = {"<null>": NULL,
159160
"string": STRING,
160161
"char": STRING,
161162
"varchar": STRING,

0 commit comments

Comments
 (0)