Class Query<TData, THandler, TPayload>
A Query defines an operation that can be used to filter a data set.
Namespace: Unity.QuickSearch
Syntax
public class Query<TData, THandler, TPayload>
where THandler : Delegate
Type Parameters
Name | Description |
---|---|
TData | The filtered data type. |
THandler | The type of the function called by the QueryHandler when walking its elements. |
TPayload | The payload type. |
Fields
m_Engine
The engine that created this query.
Declaration
protected QueryEngine<TData> m_Engine
Field Value
Type | Description |
---|---|
QueryEngine<TData> |
Properties
errors
List of QueryErrors.
Declaration
public List<QueryError> errors { get; }
Property Value
Type | Description |
---|---|
List<QueryError> |
valid
Indicates if the query is valid or not.
Declaration
public bool valid { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
Optimize(Boolean, Boolean)
Optimize the query by optimizing the underlying filtering graph.
Declaration
public void Optimize(bool propagateNotToLeaves, bool swapNotToRightHandSide)
Parameters
Type | Name | Description |
---|---|---|
Boolean | propagateNotToLeaves | Propagate "Not" operations to leaves, so only leaves can have "Not" operations as parents. |
Boolean | swapNotToRightHandSide | Swaps "Not" operations to the right hand side of combining operations (i.e. "And", "Or"). Useful if a "Not" operation is slow. |