Skip to content

Commit 32ba752

Browse files
committedMay 24, 2018
[oracle] Fix handling of NULL values when add features to provider
Fixes NULL attribute values are incorrectly converted to empty strings or 0 numeric values instead of NULL. (cherry-picked from 3a3b0fe)
1 parent a4e2e8a commit 32ba752

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎tests/src/python/test_provider_oracle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def execSQLCommand(self, sql, ignore_errors=False):
6767
def disabled_getSource(self):
6868
# create temporary table for edit tests
6969
self.execSQLCommand('DROP TABLE "QGIS"."EDIT_DATA"', ignore_errors=True)
70-
self.execSQLCommand("""CREATE TABLE QGIS.EDIT_DATA ("pk" INTEGER PRIMARY KEY, "cnt" INTEGER, "name" VARCHAR2(100), "name2" VARCHAR2(100), "num_char" VARCHAR2(100), GEOM SDO_GEOMETRY)""")
70+
self.execSQLCommand("""CREATE TABLE QGIS.EDIT_DATA ("pk" INTEGER GENERATED by default ON null as IDENTITY(START WITH 1 INCREMENT BY 1) PRIMARY KEY, "cnt" INTEGER, "name" VARCHAR2(100), "name2" VARCHAR2(100), "num_char" VARCHAR2(100), GEOM SDO_GEOMETRY)""")
7171
self.execSQLCommand("""INSERT INTO QGIS.EDIT_DATA ("pk", "cnt", "name", "name2", "num_char", GEOM)
7272
SELECT 5, -200, NULL, 'NuLl', '5', SDO_GEOMETRY( 2001,4326,SDO_POINT_TYPE(-71.123, 78.23, NULL), NULL, NULL) from dual
7373
UNION ALL SELECT 3, 300, 'Pear', 'PEaR', '3', NULL from dual

0 commit comments

Comments
 (0)
Please sign in to comment.