ExpressionFactory¶
- class lsst.daf.butler.queries.expression_factory.ExpressionFactory(universe: DimensionUniverse)¶
- Bases: - object- A factory for creating column expressions that uses operator overloading to form a mini-language. - Instances of this class are usually obtained from - Query.expression_factory; see that property’s documentation for more information.- Parameters:
- universeDimensionUniverse
- Object that describes all dimensions. 
 
- universe
 - Methods Summary - all(first, /, *args)- Combine a sequence of boolean expressions with logical AND. - any(first, /, *args)- Combine a sequence of boolean expressions with logical OR. - literal(value)- Return an expression proxy that represents a literal value. - not_(operand)- Apply a logical NOT operation to a boolean expression. - unwrap(proxy)- Return the column expression object that backs a proxy. - Methods Documentation - all(first: Predicate, /, *args: Predicate) Predicate¶
- Combine a sequence of boolean expressions with logical AND. 
 - any(first: Predicate, /, *args: Predicate) Predicate¶
- Combine a sequence of boolean expressions with logical OR. 
 - static literal(value: object) ExpressionProxy¶
- Return an expression proxy that represents a literal value. - Expression proxy objects obtained from this factory can generally be compared directly to literals, so calling this method directly in user code should rarely be necessary. - Parameters:
- valueobject
- Value to include as a literal in an expression tree. 
 
- value
- Returns:
- expressionExpressionProxy
- Expression wrapper for this literal. 
 
- expression
 
 - not_(operand: Predicate) Predicate¶
- Apply a logical NOT operation to a boolean expression. - Parameters:
- operandtree.Predicate
- Expression to invetree. 
 
- operand
- Returns:
- logical_nottree.Predicate
- A boolean expression that evaluates to the opposite of - operand.
 
- logical_not
 
 - static unwrap(proxy: ExpressionProxy) IntColumnLiteral | StringColumnLiteral | FloatColumnLiteral | HashColumnLiteral | UUIDColumnLiteral | DateTimeColumnLiteral | TimespanColumnLiteral | RegionColumnLiteral | DimensionKeyReference | DimensionFieldReference | DatasetFieldReference | UnaryExpression | BinaryExpression¶
- Return the column expression object that backs a proxy. - Parameters:
- proxyExpressionProxy
- Proxy constructed via an - ExpressionFactory.
 
- proxy
- Returns:
- expressiontree.ColumnExpression
- Underlying column expression object. 
 
- expression