ChainedDatasetQueryResults¶
-
class
lsst.daf.butler.registry.queries.ChainedDatasetQueryResults(chain: Sequence[lsst.daf.butler.registry.queries.ParentDatasetQueryResults])¶ Bases:
Iterable[lsst.daf.butler.DatasetRef]A
DatasetQueryResultsimplementation that simply chains together other results objects, each for a different parent dataset type.- Parameters
- chain
Sequence[ParentDatasetQueryResults] The underlying results objects this object will chain together.
- chain
Methods Summary
Group results by parent dataset type.
expanded()Return a
DatasetQueryResultsfor whichDataCoordinate.hasResultsreturnsTruefor all data IDs in returnedDatasetRefobjects.Insert this query’s results into a temporary table.
Methods Documentation
-
byParentDatasetType() → Iterator[lsst.daf.butler.registry.queries.ParentDatasetQueryResults]¶ Group results by parent dataset type.
- Returns
- iter
Iterator[ParentDatasetQueryResults] An iterator over
DatasetQueryResultsinstances that are each responsible for a single parent dataset type (either just that dataset type, one or more of its component dataset types, or both).
- iter
-
expanded() →lsst.daf.butler.registry.queries.ChainedDatasetQueryResults¶ Return a
DatasetQueryResultsfor whichDataCoordinate.hasResultsreturnsTruefor all data IDs in returnedDatasetRefobjects.- Returns
- expanded
DatasetQueryResults Either a new
DatasetQueryResultsinstance orself, if it is already expanded.
- expanded
Notes
As with
DataCoordinateQueryResults.expanded, it may be more efficient to callmaterializebefore expanding data IDs for very large result sets.
-
materialize() → Iterator[lsst.daf.butler.registry.queries.ChainedDatasetQueryResults]¶ Insert this query’s results into a temporary table.
- Returns
- context
typing.ContextManager[DatasetQueryResults] A context manager that ensures the temporary table is created and populated in
__enter__(returning a results object backed by that table), and dropped in__exit__. Ifselfis already materialized, the context manager may do nothing (reflecting the fact that an outer context manager should already take care of everything else).
- context