MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / get_connection_spec

Method get_connection_spec

asyncpg/_testbase/__init__.py:526–539  ·  view source on GitHub ↗
(cls, kwargs={})

Source from the content-addressed store, hash-verified

524
525 @classmethod
526 def get_connection_spec(cls, kwargs={}):
527 primary_spec = cls.get_cluster_connection_spec(
528 cls.master_cluster, kwargs
529 )
530 standby_spec = cls.get_cluster_connection_spec(
531 cls.standby_cluster, kwargs
532 )
533 return {
534 'host': [primary_spec['host'], standby_spec['host']],
535 'port': [primary_spec['port'], standby_spec['port']],
536 'database': primary_spec['database'],
537 'user': primary_spec['user'],
538 **kwargs
539 }
540
541 @classmethod
542 def connect_primary(cls, **kwargs):

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected