MCPcopy
hub / github.com/django/django / quote_name

Method quote_name

django/db/backends/oracle/operations.py:391–402  ·  view source on GitHub ↗
(self, name)

Source from the content-addressed store, hash-verified

389 return value.read()
390
391 def quote_name(self, name):
392 # SQL92 requires delimited (quoted) names to be case-sensitive. When
393 # not quoted, Oracle has case-insensitive behavior for identifiers, but
394 # always defaults to uppercase.
395 # We simplify things by making Oracle identifiers always uppercase.
396 if not name.startswith('"') and not name.endswith('"'):
397 name = '"%s"' % truncate_name(name, self.max_name_length())
398 # Oracle puts the query text into a (query % args) construct, so %
399 # signs in names need to be escaped. The '%%' will be collapsed back to
400 # '%' at that stage so we aren't really making the name longer here.
401 name = name.replace("%", "%%")
402 return name.upper()
403
404 def regex_lookup(self, lookup_type):
405 if lookup_type == "regex":

Callers 11

cache_key_culling_sqlMethod · 0.95
returning_columnsMethod · 0.95
sql_flushMethod · 0.95
sequence_reset_sqlMethod · 0.95
tablespace_sqlMethod · 0.95
normalize_nameMethod · 0.45
_drop_identityMethod · 0.45
_savepoint_commitMethod · 0.45
get_table_descriptionMethod · 0.45

Calls 2

max_name_lengthMethod · 0.95
truncate_nameFunction · 0.90

Tested by

no test coverage detected