MCPcopy
hub / github.com/django/django / returning_columns

Method returning_columns

django/db/backends/oracle/operations.py:299–316  ·  view source on GitHub ↗
(self, fields)

Source from the content-addressed store, hash-verified

297 return " DEFERRABLE INITIALLY DEFERRED"
298
299 def returning_columns(self, fields):
300 if not fields:
301 return "", ()
302 field_names = []
303 params = []
304 for field in fields:
305 field_names.append(
306 "%s.%s"
307 % (
308 self.quote_name(field.model._meta.db_table),
309 self.quote_name(field.column),
310 )
311 )
312 params.append(BoundVar(field))
313 return "RETURNING %s INTO %s" % (
314 ", ".join(field_names),
315 ", ".join(["%s"] * len(params)),
316 ), tuple(params)
317
318 def fetch_returned_rows(self, cursor, returning_params):
319 return list(zip(*(param.get_value() for param in returning_params)))

Callers 2

as_sqlMethod · 0.45
as_sqlMethod · 0.45

Calls 4

quote_nameMethod · 0.95
BoundVarClass · 0.85
appendMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected