QuerySummary¶
-
class
lsst.daf.butler.registry.queries.QuerySummary(requested: lsst.daf.butler.core.dimensions.graph.DimensionGraph, *, dataId: Optional[lsst.daf.butler.core.dimensions.coordinate.ExpandedDataCoordinate] = None, expression: Union[str, lsst.daf.butler.registry.queries._structs.QueryWhereExpression, None] = None, given: Optional[lsst.daf.butler.core.dimensions.graph.DimensionGraph] = None, entire: Optional[lsst.daf.butler.core.utils.NamedValueSet[lsst.daf.butler.core.dimensions.elements.DimensionElement][lsst.daf.butler.core.dimensions.elements.DimensionElement]] = None)¶ 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 :
ExpandedDataCoordinate, optional A fully-expanded data ID identifying dimensions known in advance. If not provided, will be set to an empty data ID.
- expression :
strorQueryWhereExpression, optional A user-provided string WHERE expression.
- given :
DimensionGraph, optional Dimensions that will be fully identified before the query is executed, if not necessarily provided (in
dataId) now. If provided, must be a superset ofdataId.graph; if not provided, will be set todataId.graph.- entire :
NamedValueSetofDimensionElement, optional Dimension elements that should be fully included in any spatial or temporal join, including child elements that would not otherwise be included in that join. For example, passing “visit” here in a query constrained to a single tract would include all visit+detector combinations in any visit that overlaps that tract, not just the visit+detector combinations that directly overlap the tract.
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 ( NamedValueSetofDimensionElement).temporalDimension elements whose timespans should be included in the query ( NamedValueSetofDimensionElement).universeAll known dimensions ( DimensionUniverse).Methods Summary
whenIsDimensionGiven(dimension)Return an enumeration value indicating when the given dimension is identified in the WHERE clause. whenIsRegionGiven()Return an enumeration value indicating when a region is provided in the WHERE clause. whenIsTimespanGiven()Return an enumeration value indicating when a timespan is provided in the WHERE clause. 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 (
NamedValueSetofDimensionElement).
-
temporal¶ Dimension elements whose timespans should be included in the query (
NamedValueSetofDimensionElement).
-
universe¶ All known dimensions (
DimensionUniverse).
Methods Documentation
-
whenIsDimensionGiven(dimension: lsst.daf.butler.core.dimensions.elements.Dimension) → lsst.daf.butler.registry.queries._structs.GivenTime¶ Return an enumeration value indicating when the given dimension is identified in the WHERE clause.
Returns: - when :
GivenTime Enumeration indicating when the dimension is identified.
- when :
-
whenIsRegionGiven() → lsst.daf.butler.registry.queries._structs.GivenTime¶ Return an enumeration value indicating when a region is provided in the WHERE clause.
Returns: - when :
GivenTime Enumeration indicating when a region is provided.
- when :
-
whenIsTimespanGiven() → lsst.daf.butler.registry.queries._structs.GivenTime¶ Return an enumeration value indicating when a timespan is provided in the WHERE clause.
Returns: - when :
GivenTime Enumeration indicating when a timespan is provided.
- when :
- requested :