MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / quote_identifier

Method quote_identifier

lib/sqlalchemy/sql/compiler.py:8017–8028  ·  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

8015 return element
8016
8017 def quote_identifier(self, value: str) -> str:
8018 """Quote an identifier.
8019
8020 Subclasses should override this to provide database-dependent
8021 quoting behavior.
8022 """
8023
8024 return (
8025 self.initial_quote
8026 + self._escape_identifier(value)
8027 + self.final_quote
8028 )
8029
8030 def _requires_quotes(self, value: str) -> bool:
8031 """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