docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class Query

    The request body for querying an index

    Inheritance
    object
    Query
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Services.CloudSave.Models
    Assembly: Unity.Services.CloudSave.dll
    Syntax
    [Preserve]
    [DataContract(Name = "Query")]
    public class Query

    Constructors

    Query(List<FieldFilter>, HashSet<string>, int, int)

    The request body for querying an index

    Declaration
    [Preserve]
    public Query(List<FieldFilter> fields, HashSet<string> returnKeys = null, int offset = 0, int limit = 0)
    Parameters
    Type Name Description
    List<FieldFilter> fields

    fields param

    HashSet<string> returnKeys

    The keys to return in the response. This can include keys not on the index. If not specified or empty, the data on the results will be empty for any returned entities.

    int offset

    The number of results to skip. Defaults to 0.

    int limit

    The maximum number of results to return. Defaults to 10. Specifying 0 will return the default number of results.

    Query(List<FieldFilter>, HashSet<string>, int, int, int?)

    The request body for querying an index

    Declaration
    [Preserve]
    public Query(List<FieldFilter> fields, HashSet<string> returnKeys, int offset, int limit, int? sampleSize)
    Parameters
    Type Name Description
    List<FieldFilter> fields

    fields param

    HashSet<string> returnKeys

    The keys to return in the response. This can include keys not on the index. If not specified or empty, the data on the results will be empty for any returned entities.

    int offset

    The number of results to skip. Defaults to 0.

    int limit

    The maximum number of results to return. Defaults to 10. Specifying 0 will return the default number of results.

    int? sampleSize

    If set, the given number of random items will be chosen from the total query results and returned as a sample. Defaults to null.

    Properties

    Fields

    Parameter fields of Query

    Declaration
    [Preserve]
    [DataMember(Name = "fields", IsRequired = true, EmitDefaultValue = true)]
    public List<FieldFilter> Fields { get; }
    Property Value
    Type Description
    List<FieldFilter>

    Limit

    The maximum number of results to return. Defaults to 10. Specifying 0 will return the default number of results.

    Declaration
    [Preserve]
    [DataMember(Name = "limit", EmitDefaultValue = false)]
    public int Limit { get; }
    Property Value
    Type Description
    int

    Offset

    The number of results to skip. Defaults to 0.

    Declaration
    [Preserve]
    [DataMember(Name = "offset", EmitDefaultValue = false)]
    public int Offset { get; }
    Property Value
    Type Description
    int

    ReturnKeys

    The keys to return in the response. This can include keys not on the index. If not specified or empty, the data on the results will be empty for any returned entities.

    Declaration
    [Preserve]
    [DataMember(Name = "returnKeys", EmitDefaultValue = false)]
    public HashSet<string> ReturnKeys { get; }
    Property Value
    Type Description
    HashSet<string>

    SampleSize

    If set, the given number of random items will be chosen from the total query results and returned as a sample. Defaults to null.

    Declaration
    [Preserve]
    [DataMember(Name = "sampleSize", EmitDefaultValue = false)]
    public int? SampleSize { get; }
    Property Value
    Type Description
    int?
    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)