docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IQueryEngineFilter

    Interface for Query filters.

    Namespace: UnityEditor.Search
    Assembly: com.unity.quicksearch.dll
    Syntax
    public interface IQueryEngineFilter

    Properties

    metaInfo

    Additional information specific to the filter.

    Declaration
    IReadOnlyDictionary<string, string> metaInfo { get; }
    Property Value
    Type Description
    IReadOnlyDictionary<string, string>

    operators

    Collection of QueryFilterOperators specific for the filter.

    Declaration
    IReadOnlyDictionary<string, QueryFilterOperator> operators { get; }
    Property Value
    Type Description
    IReadOnlyDictionary<string, QueryFilterOperator>

    overridesStringComparison

    Indicates if the filter overrides the global string comparison options.

    Declaration
    bool overridesStringComparison { get; }
    Property Value
    Type Description
    bool

    parameterType

    The type of the constant parameter passed to the filter.

    Declaration
    Type parameterType { get; }
    Property Value
    Type Description
    Type

    regexToken

    The regular expression that matches the filter. Matches what precedes the operator in a filter (for example, "id" in "id>=2").

    Declaration
    Regex regexToken { get; }
    Property Value
    Type Description
    Regex

    stringComparison

    The string comparison options of the filter.

    Declaration
    StringComparison stringComparison { get; }
    Property Value
    Type Description
    StringComparison

    supportedOperators

    List of supported operators.

    Declaration
    IEnumerable<string> supportedOperators { get; }
    Property Value
    Type Description
    IEnumerable<string>

    token

    The identifier of the filter. Typically what precedes the operator in a filter (for example, "id" in "id>=2").

    Declaration
    string token { get; }
    Property Value
    Type Description
    string

    type

    The type of the data that is compared by the filter.

    Declaration
    Type type { get; }
    Property Value
    Type Description
    Type

    usesParameter

    Indicates if the filter uses a parameter.

    Declaration
    bool usesParameter { get; }
    Property Value
    Type Description
    bool

    usesRegularExpressionToken

    Indicates if the filter uses a regular expression token or not.

    Declaration
    bool usesRegularExpressionToken { get; }
    Property Value
    Type Description
    bool

    usesResolver

    Indicates if the filter uses a resolver function.

    Declaration
    bool usesResolver { get; }
    Property Value
    Type Description
    bool

    Methods

    AddOperator(string)

    Add a custom filter operator specific to the filter. If the operator already exists, the existing operator is returned.

    Declaration
    QueryFilterOperator AddOperator(string op)
    Parameters
    Type Name Description
    string op

    The operator identifier.

    Returns
    Type Description
    QueryFilterOperator

    The added QueryFilterOperator.

    AddOrUpdateMetaInfo(string, string)

    Add additional information specific to the filter.

    Declaration
    IQueryEngineFilter AddOrUpdateMetaInfo(string key, string value)
    Parameters
    Type Name Description
    string key

    The key of the information.

    string value

    The value of the information.

    Returns
    Type Description
    IQueryEngineFilter

    The current IQueryEngineFilter.

    AddTypeParser<TFilterConstant>(Func<string, ParseResult<TFilterConstant>>)

    Add a type parser specific to the filter that parse a string and returns a custom type. Used by custom operator handlers.

    Declaration
    IQueryEngineFilter AddTypeParser<TFilterConstant>(Func<string, ParseResult<TFilterConstant>> parser)
    Parameters
    Type Name Description
    Func<string, ParseResult<TFilterConstant>> parser

    Callback used to determine if a string can be converted into TFilterConstant. Takes a string and returns a ParseResult<T> object. This contains the success flag, and the actual converted value if it succeeded.

    Returns
    Type Description
    IQueryEngineFilter

    The current IQueryEngineFilter.

    Type Parameters
    Name Description
    TFilterConstant

    The type of the parsed operand that is on the right hand side of the operator.

    ClearMetaInfo()

    Removes all additional information specific to the filter.

    Declaration
    IQueryEngineFilter ClearMetaInfo()
    Returns
    Type Description
    IQueryEngineFilter

    The current IQueryEngineFilter.

    RemoveMetaInfo(string)

    Remove information on the filter.

    Declaration
    IQueryEngineFilter RemoveMetaInfo(string key)
    Parameters
    Type Name Description
    string key

    The key of the information.

    Returns
    Type Description
    IQueryEngineFilter

    The current IQueryEngineFilter.

    RemoveOperator(string)

    Remove a custom operator specific to the filter.

    Declaration
    IQueryEngineFilter RemoveOperator(string op)
    Parameters
    Type Name Description
    string op

    The operator identifier.

    Returns
    Type Description
    IQueryEngineFilter

    The current IQueryEngineFilter.

    SetNestedQueryTransformer<TNestedQueryData, TRhs>(Func<TNestedQueryData, TRhs>)

    Set the filter's nested query transformer function. This function takes the result of a nested query and extract the necessary data to compare with the filter.

    Declaration
    void SetNestedQueryTransformer<TNestedQueryData, TRhs>(Func<TNestedQueryData, TRhs> transformer)
    Parameters
    Type Name Description
    Func<TNestedQueryData, TRhs> transformer

    The transformer function.

    Type Parameters
    Name Description
    TNestedQueryData

    The type of data returned by the nested query.

    TRhs

    The type expected on the right hand side of the filter.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)