Class StructuredQuery (2.3.0)

public sealed class StructuredQuery : IMessage<StructuredQuery>, IEquatable<StructuredQuery>, IDeepCloneable<StructuredQuery>, IBufferMessage, IMessage

A Firestore query.

Inheritance

Object > StructuredQuery

Namespace

Google.Cloud.Firestore.V1

Assembly

Google.Cloud.Firestore.V1.dll

Constructors

StructuredQuery()

public StructuredQuery()

StructuredQuery(StructuredQuery)

public StructuredQuery(StructuredQuery other)
Parameter
NameDescription
otherStructuredQuery

Properties

EndAt

public Cursor EndAt { get; set; }

A end point for the query results.

Property Value
TypeDescription
Cursor

From

public RepeatedField<StructuredQuery.Types.CollectionSelector> From { get; }

The collections to query.

Property Value
TypeDescription
RepeatedField<StructuredQuery.Types.CollectionSelector>

Limit

public int? Limit { get; set; }

The maximum number of results to return.

Applies after all other constraints. Must be >= 0 if specified.

Property Value
TypeDescription
Nullable<Int32>

Offset

public int Offset { get; set; }

The number of results to skip.

Applies before limit, but after all other constraints. Must be >= 0 if specified.

Property Value
TypeDescription
Int32

OrderBy

public RepeatedField<StructuredQuery.Types.Order> OrderBy { get; }

The order to apply to the query results.

Firestore guarantees a stable ordering through the following rules:

  • Any field required to appear in order_by, that is not already specified in order_by, is appended to the order in field name order by default.
  • If an order on __name__ is not specified, it is appended by default.

Fields are appended with the same sort direction as the last order specified, or 'ASCENDING' if no order was specified. For example:

  • SELECT * FROM Foo ORDER BY A becomes SELECT * FROM Foo ORDER BY A, __name__
  • SELECT * FROM Foo ORDER BY A DESC becomes SELECT * FROM Foo ORDER BY A DESC, __name__ DESC
  • SELECT * FROM Foo WHERE A > 1 becomes SELECT * FROM Foo WHERE A > 1 ORDER BY A, __name__
Property Value
TypeDescription
RepeatedField<StructuredQuery.Types.Order>

Select

public StructuredQuery.Types.Projection Select { get; set; }

The projection to return.

Property Value
TypeDescription
StructuredQuery.Types.Projection

StartAt

public Cursor StartAt { get; set; }

A starting point for the query results.

Property Value
TypeDescription
Cursor

Where

public StructuredQuery.Types.Filter Where { get; set; }

The filter to apply.

Property Value
TypeDescription
StructuredQuery.Types.Filter