MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / quote_schema

Method quote_schema

lib/sqlalchemy/sql/compiler.py:8045–8058  ·  view source on GitHub ↗

Conditionally quote a schema name. The name is quoted if it is a reserved word, contains quote-necessary characters, or is an instance of :class:`.quoted_name` which includes ``quote`` set to ``True``. Subclasses can override this to provide database-dependent

(self, schema: str)

Source from the content-addressed store, hash-verified

8043 return not self.legal_characters.match(str(value))
8044
8045 def quote_schema(self, schema: str) -> str:
8046 """Conditionally quote a schema name.
8047
8048
8049 The name is quoted if it is a reserved word, contains quote-necessary
8050 characters, or is an instance of :class:`.quoted_name` which includes
8051 ``quote`` set to ``True``.
8052
8053 Subclasses can override this to provide database-dependent
8054 quoting behavior for schema names.
8055
8056 :param schema: string schema name
8057 """
8058 return self.quote(schema)
8059
8060 def quote(self, ident: str) -> str:
8061 """Conditionally quote an identifier.

Callers 7

replaceMethod · 0.95
format_sequenceMethod · 0.95
format_tableMethod · 0.95
format_table_seqMethod · 0.95
visit_columnMethod · 0.45
visit_tableMethod · 0.45
_prepared_index_nameMethod · 0.45

Calls 1

quoteMethod · 0.95

Tested by

no test coverage detected