MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / quote_identifier

Method quote_identifier

lib/sqlalchemy/sql/compiler.py:7732–7743  ·  view source on GitHub ↗

Quote an identifier. Subclasses should override this to provide database-dependent quoting behavior.

(self, value: str)

Source from the content-addressed store, hash-verified

7730 return element
7731
7732 def quote_identifier(self, value: str) -> str:
7733 """Quote an identifier.
7734
7735 Subclasses should override this to provide database-dependent
7736 quoting behavior.
7737 """
7738
7739 return (
7740 self.initial_quote
7741 + self._escape_identifier(value)
7742 + self.final_quote
7743 )
7744
7745 def _requires_quotes(self, value: str) -> bool:
7746 """Return True if the given identifier requires quoting."""

Callers 12

quoteMethod · 0.95
format_savepointMethod · 0.95
get_table_namesMethod · 0.80
get_view_namesMethod · 0.80
_describe_to_createMethod · 0.80
on_connect_urlMethod · 0.80
_format_schemaMethod · 0.80
get_view_definitionMethod · 0.80
get_indexesMethod · 0.80
_get_table_sqlMethod · 0.80

Calls 1

_escape_identifierMethod · 0.95

Tested by 1