MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / get_default_schema_name

Method get_default_schema_name

test/engine/test_reconnect.py:968–974  ·  view source on GitHub ↗
(connection)

Source from the content-addressed store, hash-verified

966 eng.pool.logger = Mock()
967
968 def get_default_schema_name(connection):
969 try:
970 cursor = connection.connection.cursor()
971 connection._cursor_execute(cursor, "statement", {})
972 cursor.close()
973 except exc.DBAPIError:
974 util.warn("Exception attempting to detect")
975
976 eng.dialect._get_default_schema_name = get_default_schema_name
977 return eng

Callers

nothing calls this directly

Calls 4

_cursor_executeMethod · 0.80
cursorMethod · 0.45
closeMethod · 0.45
warnMethod · 0.45

Tested by

no test coverage detected