docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class MetadataQueryBuilder

    Allows building a fluent query to the metadata repository.

    Inheritance
    object
    MetadataQueryBuilder
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.Cloud.Metadata
    Assembly: solution.dll
    Syntax
    public class MetadataQueryBuilder

    Methods

    ExecuteAsync(CancellationToken)

    Executes the built query by calling the metadata repository.

    Declaration
    public Task<MatchCollection> ExecuteAsync(CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    CancellationToken cancellationToken

    The cancellation token

    Returns
    Type Description
    Task<MatchCollection>

    The list of Match

    IncludedIn(params InstanceId[])

    Adds the owner IDs to the lookup query.

    Declaration
    public MetadataQueryBuilder IncludedIn(params InstanceId[] instanceIds)
    Parameters
    Type Name Description
    InstanceId[] instanceIds

    The owners' ids

    Returns
    Type Description
    MetadataQueryBuilder

    The called MetadataQueryBuilder

    LimitTo(int)

    Specify the number of metadata record to return. Useful when the dataset contains thousands of metadata entry, which can affect performance.

    Declaration
    public MetadataQueryBuilder LimitTo(int amount)
    Parameters
    Type Name Description
    int amount

    The number of metadata record to return

    Returns
    Type Description
    MetadataQueryBuilder

    The called MetadataQueryBuilder

    Select(params string[])

    Adds the desired output metadata keys to the query.

    Declaration
    public MetadataQueryBuilder Select(params string[] keys)
    Parameters
    Type Name Description
    string[] keys

    An array of wanted keys

    Returns
    Type Description
    MetadataQueryBuilder

    The called MetadataQueryBuilder

    SelectAll()

    Sets the query to return the full metadata.

    Declaration
    public MetadataQueryBuilder SelectAll()
    Returns
    Type Description
    MetadataQueryBuilder

    The called MetadataQueryBuilder

    SelectOnlyId()

    Sets the query to only return the owner ID.

    Declaration
    public MetadataQueryBuilder SelectOnlyId()
    Returns
    Type Description
    MetadataQueryBuilder

    The called MetadataQueryBuilder

    WhereKeyEquals(IEnumerable<string>, string)

    Adds metadata conditions to the query.

    Declaration
    public MetadataQueryBuilder WhereKeyEquals(IEnumerable<string> path, string value)
    Parameters
    Type Name Description
    IEnumerable<string> path

    A list representing the path of keys and sub-keys in the metadata

    string value

    The value that the last keys in the keyHierarchy needs to be equals to

    Returns
    Type Description
    MetadataQueryBuilder

    The called MetadataQueryBuilder

    In This Article
    Back to top
    Copyright © 2024 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)