Version: 2022.2
LanguageEnglish
  • C#

QueryEngine

class in UnityEditor.Search

/

Inherits from:Search.QueryEngine_1

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

A QueryEngine defines how to build a query from an input string. It can be customized to support custom filters and operators. Default query engine of type object.

Constructors

QueryEngineConstruct a new QueryEngine.

Inherited Members

Properties

globalStringComparisonGlobal string comparison options for word matching and filter handling (if not overridden).
searchDataCallbackThe callback used to get the data to match to the search words.
searchDataOverridesStringComparisonIndicates if word/phrase matching uses searchDataStringComparison or not.
searchDataStringComparisonString comparison options for word/phrase matching.
searchWordMatcherThe function used to match the search data against the search words.
skipIncompleteFiltersBoolean. Indicates if incomplete filters should be skipped. If true, filters are skipped. If false and validateFilters is true, incomplete filters will generate errors when parsed.
skipUnknownFiltersBoolean. Indicates if unknown filters should be skipped. If true, unknown filters are skipped. If false and validateFilters is true, unknown filters will generate errors if no default filter handler is provided.
validateFiltersGet or set if the engine must validate filters when parsing the query. Defaults to true.

Public Methods

AddFilterAdds a new custom filter.
AddFiltersFromAttributeAdds all custom filters that are identified with the method attribute TFilterAttribute.
AddNestedQueryAggregatorAdds a new nested query aggregator. An aggregator is an operation that can be applied on a nested query to aggregate the results of the nested query according to certain criteria.
AddOperatorAdds a custom filter operator.
AddOperatorHandlerAdds a custom filter operator handler.
AddTypeParserAdds a type parser that parses a string and returns a custom type. Used by custom operator handlers (see AddOperatorHandler).
ClearFiltersRemoves all filters that were added on the QueryEngine.
GetAllFiltersGet all filters added on this QueryEngine.
GetOperatorGet a custom operator added on the QueryEngine.
ParseQueryParses a query string into a ParsedQuery operation. This ParsedQuery operation can then be used to filter any data set of type TData.
RemoveFilterRemoves a custom filter.
RemoveOperatorRemoves a custom operator that was added on the QueryEngine.
SetDefaultFilterSets the default filter handler for filters that were not registered.
SetDefaultParamFilterSets the default filter handler for function filters that were not registered.
SetFilterNestedQueryTransformerSets a filter's nested query transformer function. This function takes the result of a nested query and extracts the necessary data to compare with the filter.
SetGlobalStringComparisonOptionsSets global string comparison options. Used for word matching and filter handling (unless overridden by filter).
SetNestedQueryHandlerSets the function that will handle nested queries. Only one handler can be set.
SetSearchDataCallbackSets the callback used to fetch the data that is matched against the search words.
SetSearchWordMatcherSet the search word matching function to be used instead of the default one. Set to null to use the default.
TryGetFilterGet a filter by its token.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961