MCPcopy Create free account
hub / github.com/PyMySQL/mysqlclient / set_sql_mode

Method set_sql_mode

src/MySQLdb/connections.py:336–342  ·  view source on GitHub ↗

Set the connection sql_mode. See MySQL documentation for legal values.

(self, sql_mode)

Source from the content-addressed store, hash-verified

334 self.store_result()
335
336 def set_sql_mode(self, sql_mode):
337 """Set the connection sql_mode. See MySQL documentation for
338 legal values."""
339 if self._server_version < (4, 1):
340 raise NotSupportedError("server is too old to set sql_mode")
341 self.query("SET SESSION sql_mode='%s'" % sql_mode)
342 self.store_result()
343
344 def show_warnings(self):
345 """Return detailed information about warnings as a

Callers 1

__init__Method · 0.95

Calls 2

queryMethod · 0.95
NotSupportedErrorClass · 0.85

Tested by

no test coverage detected