public sealed class Query : IMessage<Query>, IEquatable<Query>, IDeepCloneable<Query>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud Datastore v1 API class Query.
A query for entities.
Namespace
Google.Cloud.Datastore.V1Assembly
Google.Cloud.Datastore.V1.dll
Constructors
Query()
public Query()
Query(Query)
public Query(Query other)
Parameter | |
---|---|
Name | Description |
other | Query |
Query(string)
public Query(string kind)
Creates a query over the given kind.
Parameter | |
---|---|
Name | Description |
kind | string The kind of the query. Must not be null. |
Properties
DistinctOn
public RepeatedField<PropertyReference> DistinctOn { get; }
The properties to make distinct. The query results will contain the first result for each distinct combination of values for the given properties (if empty, all results are returned).
Requires:
- If
order
is specified, the set of distinct on properties must appear before the non-distinct on properties inorder
.
Property Value | |
---|---|
Type | Description |
RepeatedFieldPropertyReference |
EndCursor
public ByteString EndCursor { get; set; }
An ending point for the query results. Query cursors are returned in query result batches and can only be used to limit the same query.
Property Value | |
---|---|
Type | Description |
ByteString |
Filter
public Filter Filter { get; set; }
The filter to apply.
Property Value | |
---|---|
Type | Description |
Filter |
Kind
public RepeatedField<KindExpression> Kind { get; }
The kinds to query (if empty, returns entities of all kinds). Currently at most 1 kind may be specified.
Property Value | |
---|---|
Type | Description |
RepeatedFieldKindExpression |
Limit
public int? Limit { get; set; }
The maximum number of results to return. Applies after all other constraints. Optional. Unspecified is interpreted as no limit. Must be >= 0 if specified.
Property Value | |
---|---|
Type | Description |
int |
Offset
public int Offset { get; set; }
The number of results to skip. Applies before limit, but after all other constraints. Optional. Must be >= 0 if specified.
Property Value | |
---|---|
Type | Description |
int |
Order
public RepeatedField<PropertyOrder> Order { get; }
The order to apply to the query results (if empty, order is unspecified).
Property Value | |
---|---|
Type | Description |
RepeatedFieldPropertyOrder |
Projection
public RepeatedField<Projection> Projection { get; }
The projection to return. Defaults to returning all properties.
Property Value | |
---|---|
Type | Description |
RepeatedFieldProjection |
StartCursor
public ByteString StartCursor { get; set; }
A starting point for the query results. Query cursors are returned in query result batches and can only be used to continue the same query.
Property Value | |
---|---|
Type | Description |
ByteString |