MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / OracleIdentifierPreparer

Class OracleIdentifierPreparer

lib/sqlalchemy/dialects/oracle/base.py:2049–2066  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2047
2048
2049class OracleIdentifierPreparer(compiler.IdentifierPreparer):
2050 reserved_words = {x.lower() for x in RESERVED_WORDS}
2051 illegal_initial_characters = {str(dig) for dig in range(0, 10)}.union(
2052 ["_", "$"]
2053 )
2054
2055 def _bindparam_requires_quotes(self, value):
2056 """Return True if the given identifier requires quoting."""
2057 lc_value = value.lower()
2058 return (
2059 lc_value in self.reserved_words
2060 or value[0] in self.illegal_initial_characters
2061 or not self.legal_characters.match(str(value))
2062 )
2063
2064 def format_savepoint(self, savepoint):
2065 name = savepoint.ident.lstrip("_")
2066 return super().format_savepoint(savepoint, name)
2067
2068
2069class OracleExecutionContext(default.DefaultExecutionContext):

Callers

nothing calls this directly

Calls 2

lowerMethod · 0.80
unionMethod · 0.45

Tested by

no test coverage detected