Class StructuredQuery (3.1.0)

public final class StructuredQuery extends GeneratedMessageV3 implements StructuredQueryOrBuilder

A Firestore query.

Protobuf type google.firestore.v1.StructuredQuery

Static Fields

END_AT_FIELD_NUMBER

public static final int END_AT_FIELD_NUMBER
Field Value
TypeDescription
int

FROM_FIELD_NUMBER

public static final int FROM_FIELD_NUMBER
Field Value
TypeDescription
int

LIMIT_FIELD_NUMBER

public static final int LIMIT_FIELD_NUMBER
Field Value
TypeDescription
int

OFFSET_FIELD_NUMBER

public static final int OFFSET_FIELD_NUMBER
Field Value
TypeDescription
int

ORDER_BY_FIELD_NUMBER

public static final int ORDER_BY_FIELD_NUMBER
Field Value
TypeDescription
int

SELECT_FIELD_NUMBER

public static final int SELECT_FIELD_NUMBER
Field Value
TypeDescription
int

START_AT_FIELD_NUMBER

public static final int START_AT_FIELD_NUMBER
Field Value
TypeDescription
int

WHERE_FIELD_NUMBER

public static final int WHERE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static StructuredQuery getDefaultInstance()
Returns
TypeDescription
StructuredQuery

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static StructuredQuery.Builder newBuilder()
Returns
TypeDescription
StructuredQuery.Builder

newBuilder(StructuredQuery prototype)

public static StructuredQuery.Builder newBuilder(StructuredQuery prototype)
Parameter
NameDescription
prototypeStructuredQuery
Returns
TypeDescription
StructuredQuery.Builder

parseDelimitedFrom(InputStream input)

public static StructuredQuery parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
StructuredQuery
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static StructuredQuery parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StructuredQuery
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static StructuredQuery parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
StructuredQuery
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static StructuredQuery parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StructuredQuery
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static StructuredQuery parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
StructuredQuery
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static StructuredQuery parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StructuredQuery
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static StructuredQuery parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
StructuredQuery
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static StructuredQuery parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StructuredQuery
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static StructuredQuery parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
StructuredQuery
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static StructuredQuery parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StructuredQuery
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static StructuredQuery parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
StructuredQuery
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static StructuredQuery parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StructuredQuery
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<StructuredQuery> parser()
Returns
TypeDescription
Parser<StructuredQuery>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public StructuredQuery getDefaultInstanceForType()
Returns
TypeDescription
StructuredQuery

getEndAt()

public Cursor getEndAt()

A end point for the query results.

.google.firestore.v1.Cursor end_at = 8;

Returns
TypeDescription
Cursor

The endAt.

getEndAtOrBuilder()

public CursorOrBuilder getEndAtOrBuilder()

A end point for the query results.

.google.firestore.v1.Cursor end_at = 8;

Returns
TypeDescription
CursorOrBuilder

getFrom(int index)

public StructuredQuery.CollectionSelector getFrom(int index)

The collections to query.

repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
StructuredQuery.CollectionSelector

getFromCount()

public int getFromCount()

The collections to query.

repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2;

Returns
TypeDescription
int

getFromList()

public List<StructuredQuery.CollectionSelector> getFromList()

The collections to query.

repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2;

Returns
TypeDescription
List<CollectionSelector>

getFromOrBuilder(int index)

public StructuredQuery.CollectionSelectorOrBuilder getFromOrBuilder(int index)

The collections to query.

repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
StructuredQuery.CollectionSelectorOrBuilder

getFromOrBuilderList()

public List<? extends StructuredQuery.CollectionSelectorOrBuilder> getFromOrBuilderList()

The collections to query.

repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2;

Returns
TypeDescription
List<? extends com.google.firestore.v1.StructuredQuery.CollectionSelectorOrBuilder>

getLimit()

public Int32Value getLimit()

The maximum number of results to return. Applies after all other constraints. Must be >= 0 if specified.

.google.protobuf.Int32Value limit = 5;

Returns
TypeDescription
Int32Value

The limit.

getLimitOrBuilder()

public Int32ValueOrBuilder getLimitOrBuilder()

The maximum number of results to return. Applies after all other constraints. Must be >= 0 if specified.

.google.protobuf.Int32Value limit = 5;

Returns
TypeDescription
Int32ValueOrBuilder

getOffset()

public int getOffset()

The number of results to skip. Applies before limit, but after all other constraints. Must be >= 0 if specified.

int32 offset = 6;

Returns
TypeDescription
int

The offset.

getOrderBy(int index)

public StructuredQuery.Order getOrderBy(int index)

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

repeated .google.firestore.v1.StructuredQuery.Order order_by = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
StructuredQuery.Order

getOrderByCount()

public int getOrderByCount()

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

repeated .google.firestore.v1.StructuredQuery.Order order_by = 4;

Returns
TypeDescription
int

getOrderByList()

public List<StructuredQuery.Order> getOrderByList()

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

repeated .google.firestore.v1.StructuredQuery.Order order_by = 4;

Returns
TypeDescription
List<Order>

getOrderByOrBuilder(int index)

public StructuredQuery.OrderOrBuilder getOrderByOrBuilder(int index)

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

repeated .google.firestore.v1.StructuredQuery.Order order_by = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
StructuredQuery.OrderOrBuilder

getOrderByOrBuilderList()

public List<? extends StructuredQuery.OrderOrBuilder> getOrderByOrBuilderList()

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

repeated .google.firestore.v1.StructuredQuery.Order order_by = 4;

Returns
TypeDescription
List<? extends com.google.firestore.v1.StructuredQuery.OrderOrBuilder>

getParserForType()

public Parser<StructuredQuery> getParserForType()
Returns
TypeDescription
Parser<StructuredQuery>
Overrides

getSelect()

public StructuredQuery.Projection getSelect()

The projection to return.

.google.firestore.v1.StructuredQuery.Projection select = 1;

Returns
TypeDescription
StructuredQuery.Projection

The select.

getSelectOrBuilder()

public StructuredQuery.ProjectionOrBuilder getSelectOrBuilder()

The projection to return.

.google.firestore.v1.StructuredQuery.Projection select = 1;

Returns
TypeDescription
StructuredQuery.ProjectionOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getStartAt()

public Cursor getStartAt()

A starting point for the query results.

.google.firestore.v1.Cursor start_at = 7;

Returns
TypeDescription
Cursor

The startAt.

getStartAtOrBuilder()

public CursorOrBuilder getStartAtOrBuilder()

A starting point for the query results.

.google.firestore.v1.Cursor start_at = 7;

Returns
TypeDescription
CursorOrBuilder

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

getWhere()

public StructuredQuery.Filter getWhere()

The filter to apply.

.google.firestore.v1.StructuredQuery.Filter where = 3;

Returns
TypeDescription
StructuredQuery.Filter

The where.

getWhereOrBuilder()

public StructuredQuery.FilterOrBuilder getWhereOrBuilder()

The filter to apply.

.google.firestore.v1.StructuredQuery.Filter where = 3;

Returns
TypeDescription
StructuredQuery.FilterOrBuilder

hasEndAt()

public boolean hasEndAt()

A end point for the query results.

.google.firestore.v1.Cursor end_at = 8;

Returns
TypeDescription
boolean

Whether the endAt field is set.

hasLimit()

public boolean hasLimit()

The maximum number of results to return. Applies after all other constraints. Must be >= 0 if specified.

.google.protobuf.Int32Value limit = 5;

Returns
TypeDescription
boolean

Whether the limit field is set.

hasSelect()

public boolean hasSelect()

The projection to return.

.google.firestore.v1.StructuredQuery.Projection select = 1;

Returns
TypeDescription
boolean

Whether the select field is set.

hasStartAt()

public boolean hasStartAt()

A starting point for the query results.

.google.firestore.v1.Cursor start_at = 7;

Returns
TypeDescription
boolean

Whether the startAt field is set.

hasWhere()

public boolean hasWhere()

The filter to apply.

.google.firestore.v1.StructuredQuery.Filter where = 3;

Returns
TypeDescription
boolean

Whether the where field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public StructuredQuery.Builder newBuilderForType()
Returns
TypeDescription
StructuredQuery.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected StructuredQuery.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
StructuredQuery.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public StructuredQuery.Builder toBuilder()
Returns
TypeDescription
StructuredQuery.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException