(self, relation: _CachedRelation)
return self.relations.setdefault(key, relation)
Add a relation to the cache, or return it if it already exists.

        :param _CachedRelation relation: The relation to set or get.
        :return _CachedRelation: The relation stored under the given relation's
            key
Add a relation to the cache, or return it if it already exists.
Add a relation to the cache or return it if it already exists .
def _setdefault(self, relation: _CachedRelation):
        """Add a relation to the cache, or return it if it already exists.

        :param _CachedRelation relation: The relation to set or get.
        :return _CachedRelation: The relation stored under the given relation's
            key
        """
        self.add_schema(relation.database, relation.schema)
        key = relation.key()
        return self.relations.setdefault(key, relation)
def _setdefault ( self , relation : _CachedRelation ) : self . add_schema ( relation . database , relation . schema ) key = relation . key ( ) return self . relations . setdefault ( key , relation )