MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _detect_sql_mode

Method _detect_sql_mode

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

Source from the content-addressed store, hash-verified

3710 return collations
3711
3712 def _detect_sql_mode(self, connection: Connection) -> None:
3713 setting = self._fetch_setting(connection, "sql_mode")
3714
3715 if setting is None:
3716 util.warn(
3717 "Could not retrieve SQL_MODE; please ensure the "
3718 "MySQL user has permissions to SHOW VARIABLES"
3719 )
3720 self._sql_mode = ""
3721 else:
3722 self._sql_mode = setting or ""
3723
3724 def _detect_ansiquotes(self, connection: Connection) -> None:
3725 """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