MCPcopy
hub / github.com/django/django / strip_quotes

Function strip_quotes

django/db/backends/utils.py:335–342  ·  view source on GitHub ↗

Strip quotes off of quoted table names to make them safe for use in index names, sequence names, etc. For example '"USER"."TABLE"' (an Oracle naming scheme) becomes 'USER"."TABLE'.

(table_name)

Source from the content-addressed store, hash-verified

333
334
335def strip_quotes(table_name):
336 """
337 Strip quotes off of quoted table names to make them safe for use in index
338 names, sequence names, etc. For example '"USER"."TABLE"' (an Oracle naming
339 scheme) becomes 'USER"."TABLE'.
340 """
341 has_quotes = table_name.startswith('"') and table_name.endswith('"')
342 return table_name[1:-1] if has_quotes else table_name

Callers 8

_database_existsMethod · 0.90
last_insert_idMethod · 0.90
sequence_reset_sqlMethod · 0.90
_remake_tableMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected