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

Method _detect_sql_mode

lib/sqlalchemy/dialects/mysql/base.py:3768–3778  ·  view source on GitHub ↗
(self, connection: Connection)

Source from the content-addressed store, hash-verified

3766 return collations
3767
3768 def _detect_sql_mode(self, connection: Connection) -> None:
3769 setting = self._fetch_setting(connection, "sql_mode")
3770
3771 if setting is None:
3772 util.warn(
3773 "Could not retrieve SQL_MODE; please ensure the "
3774 "MySQL user has permissions to SHOW VARIABLES"
3775 )
3776 self._sql_mode = ""
3777 else:
3778 self._sql_mode = setting or ""
3779
3780 def _detect_ansiquotes(self, connection: Connection) -> None:
3781 """Detect and adjust for the ANSI_QUOTES sql mode."""

Callers 1

initializeMethod · 0.95

Calls 2

_fetch_settingMethod · 0.95
warnMethod · 0.45

Tested by

no test coverage detected