QuerySummary¶
-
class
lsst.daf.butler.registry.queries.QuerySummary(requested: lsst.daf.butler.core.dimensions._graph.DimensionGraph, *, dataId: Optional[lsst.daf.butler.core.dimensions._coordinate.DataCoordinate] = None, expression: Union[str, lsst.daf.butler.registry.queries._structs.QueryWhereExpression, None] = None, whereRegion: Optional[lsst.sphgeom._sphgeom.Region] = None, bind: Optional[Mapping[str, Any]] = None, defaults: Optional[lsst.daf.butler.core.dimensions._coordinate.DataCoordinate] = None, check: bool = True)¶ Bases:
objectA struct that holds and categorizes the dimensions involved in a query.
A
QuerySummaryinstance is necessary to construct aQueryBuilder, and it needs to include all of the dimensions that will be included in the query (including any needed for querying datasets).Parameters: - requested :
DimensionGraph The dimensions whose primary keys should be included in the result rows of the query.
- dataId :
DataCoordinate, optional A fully-expanded data ID identifying dimensions known in advance. If not provided, will be set to an empty data ID.
dataId.hasRecords()must returnTrue.- expression :
strorQueryWhereExpression, optional A user-provided string WHERE expression.
- whereRegion :
lsst.sphgeom.Region, optional A spatial region that all rows must overlap. If
NoneanddataIdis notNone,dataId.regionwill be used.- bind :
Mapping[str,object], optional Mapping containing literal values that should be injected into the query expression, keyed by the identifiers they replace.
- defaults :
DataCoordinate, optional A data ID containing default for governor dimensions.
- check :
bool If
True(default) check the query for consistency. This may reject some valid queries that resemble common mistakes (e.g. queries for visits without specifying an instrument).
Attributes Summary
mustHaveKeysJoinedDimensions whose primary keys must be used in the JOIN ON clauses of the query, even if their tables do not appear ( DimensionGraph).mustHaveTableJoinedDimension elements whose associated tables must appear in the query’s FROM clause ( NamedValueSetofDimensionElement).spatialDimension elements whose regions and skypix IDs should be included in the query ( NamedValueAbstractSetofDimensionElement).temporalDimension elements whose timespans should be included in the query ( NamedValueSetofDimensionElement).universeAll known dimensions ( DimensionUniverse).Attributes Documentation
-
mustHaveKeysJoined¶ Dimensions whose primary keys must be used in the JOIN ON clauses of the query, even if their tables do not appear (
DimensionGraph).A
Dimensionprimary key can appear in a join clause without its table via a foreign key column in table of a dependent dimension element or dataset.
-
mustHaveTableJoined¶ Dimension elements whose associated tables must appear in the query’s FROM clause (
NamedValueSetofDimensionElement).
-
spatial¶ Dimension elements whose regions and skypix IDs should be included in the query (
NamedValueAbstractSetofDimensionElement).
-
temporal¶ Dimension elements whose timespans should be included in the query (
NamedValueSetofDimensionElement).
-
universe¶ All known dimensions (
DimensionUniverse).
- requested :