(self, connection: Connection)
| 3160 | return mariadb_callable(*arg, **kw) |
| 3161 | |
| 3162 | def initialize(self, connection: Connection) -> None: |
| 3163 | # this is driver-based, does not need server version info |
| 3164 | # and is fairly critical for even basic SQL operations |
| 3165 | self._connection_charset: Optional[str] = self._detect_charset( |
| 3166 | connection |
| 3167 | ) |
| 3168 | |
| 3169 | # call super().initialize() because we need to have |
| 3170 | # server_version_info set up. in 1.4 under python 2 only this does the |
| 3171 | # "check unicode returns" thing, which is the one area that some |
| 3172 | # SQL gets compiled within initialize() currently |
| 3173 | default.DefaultDialect.initialize(self, connection) |
| 3174 | |
| 3175 | self._detect_sql_mode(connection) |
| 3176 | self._detect_ansiquotes(connection) # depends on sql mode |
| 3177 | self._detect_casing(connection) |
| 3178 | if self._server_ansiquotes: |
| 3179 | # if ansiquotes == True, build a new IdentifierPreparer |
| 3180 | # with the new setting |
| 3181 | self.identifier_preparer = self.preparer( |
| 3182 | self, server_ansiquotes=self._server_ansiquotes |
| 3183 | ) |
| 3184 | |
| 3185 | self._dispatch_for_vendor( |
| 3186 | self._initialize_mysql, self._initialize_mariadb, connection |
| 3187 | ) |
| 3188 | |
| 3189 | def _initialize_mysql(self, connection: Connection) -> None: |
| 3190 | assert not self.is_mariadb |
nothing calls this directly
no test coverage detected