MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _configs_for_db_operation

Function _configs_for_db_operation

lib/sqlalchemy/testing/provision.py:248–264  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

246
247
248def _configs_for_db_operation():
249 hosts = set()
250
251 for cfg in config.Config.all_configs():
252 cfg.db.dispose()
253
254 for cfg in config.Config.all_configs():
255 url = cfg.db.url
256 backend = url.get_backend_name()
257 host_conf = (backend, url.username, url.host, url.database)
258
259 if host_conf not in hosts:
260 yield cfg
261 hosts.add(host_conf)
262
263 for cfg in config.Config.all_configs():
264 cfg.db.dispose()
265
266
267@register.init

Callers 2

create_follower_dbFunction · 0.85
drop_follower_dbFunction · 0.85

Calls 4

all_configsMethod · 0.80
get_backend_nameMethod · 0.80
disposeMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected