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

Method get_default_schema_name

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

Source from the content-addressed store, hash-verified

964 eng.pool.logger = Mock()
965
966 def get_default_schema_name(connection):
967 try:
968 cursor = connection.connection.cursor()
969 connection._cursor_execute(cursor, "statement", {})
970 cursor.close()
971 except exc.DBAPIError:
972 util.warn("Exception attempting to detect")
973
974 eng.dialect._get_default_schema_name = get_default_schema_name
975 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