diff options
author | Johannes Hoppe <info@johanneshoppe.com> | 2019-09-14 14:50:14 -0700 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-09-24 10:22:43 +0200 |
commit | b31e63879eb5d9717e9f890401f7222e4f00c910 (patch) | |
tree | 66c1f61fbcaf660c04b61c5b772edd65625b0489 /django/db/backends/oracle/utils.py | |
parent | d71497bb249a2c3ffec41e99089f5ae8e575f2d3 (diff) | |
download | django-b31e63879eb5d9717e9f890401f7222e4f00c910.tar.gz |
Fixed #29444 -- Allowed returning multiple fields from INSERT statements on Oracle.
Diffstat (limited to 'django/db/backends/oracle/utils.py')
-rw-r--r-- | django/db/backends/oracle/utils.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/django/db/backends/oracle/utils.py b/django/db/backends/oracle/utils.py index fdd6dee617..38a2c71774 100644 --- a/django/db/backends/oracle/utils.py +++ b/django/db/backends/oracle/utils.py @@ -27,11 +27,14 @@ class InsertVar: def __init__(self, field): internal_type = getattr(field, 'target_field', field).get_internal_type() self.db_type = self.types.get(internal_type, str) + self.bound_param = None def bind_parameter(self, cursor): - param = cursor.cursor.var(self.db_type) - cursor._insert_id_var = param - return param + self.bound_param = cursor.cursor.var(self.db_type) + return self.bound_param + + def get_value(self): + return self.bound_param.getvalue() class Oracle_datetime(datetime.datetime): |