Source code for ska_db_oda.repository.relationship
"""Common repository classes for cross-schema operations."""
from psycopg import Connection
from ska_db_oda.postgres.mapping import EntityRelationshipMapping
from ska_db_oda.postgres.postgres_persistence import PostgresPersistence
from ska_db_oda.repository.base import AbstractRepository
[docs]
class EntityRelationshipRepository(AbstractRepository[any, any]):
"""Abstraction over persistent storage of Relational Entities."""
def __init__(self, conn: Connection):
super().__init__(conn)
self.postgres = PostgresPersistence(
postgres_mapping=EntityRelationshipMapping(), connection=conn
)