1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

Fixed #33339 -- Made QuerySet.bulk_create() use TO_NCLOB() for TextFields on Oracle.

This commit is contained in:
Georgi Yanchev 2021-12-02 18:27:25 -05:00 committed by Mariusz Felisiak
parent 97e9a84d27
commit 9c1fe446b6

View File

@ -55,9 +55,9 @@ class Oracle_datetime(datetime.datetime):
class BulkInsertMapper:
BLOB = 'TO_BLOB(%s)'
CLOB = 'TO_CLOB(%s)'
DATE = 'TO_DATE(%s)'
INTERVAL = 'CAST(%s as INTERVAL DAY(9) TO SECOND(6))'
NCLOB = 'TO_NCLOB(%s)'
NUMBER = 'TO_NUMBER(%s)'
TIMESTAMP = 'TO_TIMESTAMP(%s)'
@ -78,7 +78,7 @@ class BulkInsertMapper:
'PositiveSmallIntegerField': NUMBER,
'SmallAutoField': NUMBER,
'SmallIntegerField': NUMBER,
'TextField': CLOB,
'TextField': NCLOB,
'TimeField': TIMESTAMP,
}