MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / compile

Method compile

lib/sqlalchemy/sql/type_api.py:1132–1147  ·  view source on GitHub ↗

Produce a string-compiled form of this :class:`.TypeEngine`. When called with no arguments, uses a "default" dialect to produce a string result. :param dialect: a :class:`.Dialect` instance.

(self, dialect: Optional[Dialect] = None)

Source from the content-addressed store, hash-verified

1130 return self._type_affinity is other._type_affinity
1131
1132 def compile(self, dialect: Optional[Dialect] = None) -> str:
1133 """Produce a string-compiled form of this :class:`.TypeEngine`.
1134
1135 When called with no arguments, uses a "default" dialect
1136 to produce a string result.
1137
1138 :param dialect: a :class:`.Dialect` instance.
1139
1140 """
1141 # arg, return value is inconsistent with
1142 # ClauseElement.compile()....this is a mistake.
1143
1144 if dialect is None:
1145 dialect = self._default_dialect()
1146
1147 return dialect.type_compiler_instance.process(self)
1148
1149 @util.preload_module("sqlalchemy.engine.default")
1150 def _default_dialect(self) -> Dialect:

Callers 15

__str__Method · 0.95
cython_imports.pyFile · 0.45
tox_parametersFunction · 0.45
base.pyFile · 0.45
visit_arrayMethod · 0.45
_fk_ondelete_patternMethod · 0.45
PGDialectClass · 0.45
_fk_regex_patternMethod · 0.45
hstore.pyFile · 0.45

Calls 2

_default_dialectMethod · 0.95
processMethod · 0.45