ChainedCollectionRecord¶
- class lsst.daf.butler.registry.interfaces.ChainedCollectionRecord(key: Any, name: str, universe: DimensionUniverse)¶
- Bases: - CollectionRecord- A subclass of - CollectionRecordthat adds the list of child collections in a- CHAINEDcollection.- Parameters:
- key
- Unique collection ID, can be the same as - nameif- nameis used for identification. Usually this is an integer or string, but can be other database-specific type.
- namestr
- Name of the collection. 
 
 - Attributes Summary - The ordered search path of child collections that define this chain ( - tuple[- str]).- Methods Summary - refresh(manager)- Load children from the database, using the given manager to resolve collection primary key values into records. - update(manager, children, flatten)- Redefine this chain to search the given child collections. - Attributes Documentation - Methods Documentation - refresh(manager: CollectionManager) None¶
- Load children from the database, using the given manager to resolve collection primary key values into records. - This method exists to ensure that all collections that may appear in a chain are known to the manager before any particular chain tries to retrieve their records from it. - ChainedCollectionRecordsubclasses can rely on it being called sometime after their own- __init__to finish construction.- Parameters:
- managerCollectionManager
- The object that manages this records instance and all records instances that may appear as its children. 
 
- manager
 
 - update(manager: CollectionManager, children: tuple[str, ...], flatten: bool) None¶
- Redefine this chain to search the given child collections. - This method should be used by all external code to set children. It delegates to - _update, which is what should be overridden by subclasses.- Parameters:
- managerCollectionManager
- The object that manages this records instance and all records instances that may appear as its children. 
- childrentuple[str]
- A collection search path that should be resolved to set the child collections of this chain. 
- flattenbool
- If - True, recursively flatten out any nested- CHAINEDcollections in- childrenfirst.
 
- manager
- Raises:
- ValueError
- Raised when the child collections contain a cycle.