DatasetQueryResults¶
-
class
lsst.daf.butler.registry.queries.
DatasetQueryResults
(*args, **kwds)¶ Bases:
Iterable
[lsst.daf.butler.DatasetRef
]An interface for objects that represent the results of queries for datasets.
Methods Summary
Group results by parent dataset type.
expanded
()Return a
DatasetQueryResults
for whichDataCoordinate.hasResults
returnsTrue
for all data IDs in returnedDatasetRef
objects.Insert this query’s results into a temporary table.
Methods Documentation
-
abstract
byParentDatasetType
() → Iterator[lsst.daf.butler.registry.queries.ParentDatasetQueryResults
]¶ Group results by parent dataset type.
- Returns
- iter
Iterator
[ParentDatasetQueryResults
] An iterator over
DatasetQueryResults
instances 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
-
abstract
expanded
() →lsst.daf.butler.registry.queries.DatasetQueryResults
¶ Return a
DatasetQueryResults
for whichDataCoordinate.hasResults
returnsTrue
for all data IDs in returnedDatasetRef
objects.- Returns
- expanded
DatasetQueryResults
Either a new
DatasetQueryResults
instance orself
, if it is already expanded.
- expanded
Notes
As with
DataCoordinateQueryResults.expanded
, it may be more efficient to callmaterialize
before expanding data IDs for very large result sets.
-
abstract
materialize
() → AbstractContextManager[lsst.daf.butler.registry.queries.DatasetQueryResults
]¶ 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__
. Ifself
is already materialized, the context manager may do nothing (reflecting the fact that an outer context manager should already take care of everything else).
- context
-
abstract