Class Query
The request body for querying an index
Inherited Members
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? |