Package com.google.firestore.v1
Interface StructuredQueryOrBuilder
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
StructuredQuery,StructuredQuery.Builder
public interface StructuredQueryOrBuilder
extends com.google.protobuf.MessageOrBuilder
-
Method Summary
Modifier and TypeMethodDescriptiongetEndAt()A potential prefix of a position in the result set to end the query at.A potential prefix of a position in the result set to end the query at.getFrom(int index) The collections to query.intThe collections to query.The collections to query.getFromOrBuilder(int index) The collections to query.List<? extends StructuredQuery.CollectionSelectorOrBuilder>The collections to query.com.google.protobuf.Int32ValuegetLimit()The maximum number of results to return.com.google.protobuf.Int32ValueOrBuilderThe maximum number of results to return.intThe number of documents to skip before returning the first result.getOrderBy(int index) The order to apply to the query results.intThe order to apply to the query results.The order to apply to the query results.getOrderByOrBuilder(int index) The order to apply to the query results.List<? extends StructuredQuery.OrderOrBuilder>The order to apply to the query results.Optional sub-set of the fields to return.Optional sub-set of the fields to return.A potential prefix of a position in the result set to start the query at.A potential prefix of a position in the result set to start the query at.getWhere()The filter to apply.The filter to apply.booleanhasEndAt()A potential prefix of a position in the result set to end the query at.booleanhasLimit()The maximum number of results to return.booleanOptional sub-set of the fields to return.booleanA potential prefix of a position in the result set to start the query at.booleanhasWhere()The filter to apply.Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
isInitializedMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
hasSelect
boolean hasSelect()Optional sub-set of the fields to return. This acts as a [DocumentMask][google.firestore.v1.DocumentMask] over the documents returned from a query. When not set, assumes that the caller wants all fields returned.
.google.firestore.v1.StructuredQuery.Projection select = 1;- Returns:
- Whether the select field is set.
-
getSelect
StructuredQuery.Projection getSelect()Optional sub-set of the fields to return. This acts as a [DocumentMask][google.firestore.v1.DocumentMask] over the documents returned from a query. When not set, assumes that the caller wants all fields returned.
.google.firestore.v1.StructuredQuery.Projection select = 1;- Returns:
- The select.
-
getSelectOrBuilder
StructuredQuery.ProjectionOrBuilder getSelectOrBuilder()Optional sub-set of the fields to return. This acts as a [DocumentMask][google.firestore.v1.DocumentMask] over the documents returned from a query. When not set, assumes that the caller wants all fields returned.
.google.firestore.v1.StructuredQuery.Projection select = 1; -
getFromList
List<StructuredQuery.CollectionSelector> getFromList()The collections to query.
repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; -
getFrom
The collections to query.
repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; -
getFromCount
int getFromCount()The collections to query.
repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; -
getFromOrBuilderList
List<? extends StructuredQuery.CollectionSelectorOrBuilder> getFromOrBuilderList()The collections to query.
repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; -
getFromOrBuilder
The collections to query.
repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; -
hasWhere
boolean hasWhere()The filter to apply.
.google.firestore.v1.StructuredQuery.Filter where = 3;- Returns:
- Whether the where field is set.
-
getWhere
StructuredQuery.Filter getWhere()The filter to apply.
.google.firestore.v1.StructuredQuery.Filter where = 3;- Returns:
- The where.
-
getWhereOrBuilder
StructuredQuery.FilterOrBuilder getWhereOrBuilder()The filter to apply.
.google.firestore.v1.StructuredQuery.Filter where = 3; -
getOrderByList
List<StructuredQuery.Order> getOrderByList()The order to apply to the query results. Firestore allows callers to provide a full ordering, a partial ordering, or no ordering at all. In all cases, Firestore guarantees a stable ordering through the following rules: * The `order_by` is required to reference all fields used with an inequality filter. * All fields that are required to be in the `order_by` but are not already present are appended in lexicographical ordering of the field name. * 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: * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` * `WHERE __name__ > ... AND a > 1` becomes `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC`repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; -
getOrderBy
The order to apply to the query results. Firestore allows callers to provide a full ordering, a partial ordering, or no ordering at all. In all cases, Firestore guarantees a stable ordering through the following rules: * The `order_by` is required to reference all fields used with an inequality filter. * All fields that are required to be in the `order_by` but are not already present are appended in lexicographical ordering of the field name. * 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: * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` * `WHERE __name__ > ... AND a > 1` becomes `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC`repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; -
getOrderByCount
int getOrderByCount()The order to apply to the query results. Firestore allows callers to provide a full ordering, a partial ordering, or no ordering at all. In all cases, Firestore guarantees a stable ordering through the following rules: * The `order_by` is required to reference all fields used with an inequality filter. * All fields that are required to be in the `order_by` but are not already present are appended in lexicographical ordering of the field name. * 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: * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` * `WHERE __name__ > ... AND a > 1` becomes `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC`repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; -
getOrderByOrBuilderList
List<? extends StructuredQuery.OrderOrBuilder> getOrderByOrBuilderList()The order to apply to the query results. Firestore allows callers to provide a full ordering, a partial ordering, or no ordering at all. In all cases, Firestore guarantees a stable ordering through the following rules: * The `order_by` is required to reference all fields used with an inequality filter. * All fields that are required to be in the `order_by` but are not already present are appended in lexicographical ordering of the field name. * 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: * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` * `WHERE __name__ > ... AND a > 1` becomes `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC`repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; -
getOrderByOrBuilder
The order to apply to the query results. Firestore allows callers to provide a full ordering, a partial ordering, or no ordering at all. In all cases, Firestore guarantees a stable ordering through the following rules: * The `order_by` is required to reference all fields used with an inequality filter. * All fields that are required to be in the `order_by` but are not already present are appended in lexicographical ordering of the field name. * 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: * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` * `WHERE __name__ > ... AND a > 1` becomes `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC`repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; -
hasStartAt
boolean hasStartAt()A potential prefix of a position in the result set to start the query at. The ordering of the result set is based on the `ORDER BY` clause of the original query. ``` SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; ``` This query's results are ordered by `(b ASC, __name__ ASC)`. Cursors can reference either the full ordering or a prefix of the location, though it cannot reference more fields than what are in the provided `ORDER BY`. Continuing off the example above, attaching the following start cursors will have varying impact: - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND b > 2 AND __name__ > /k/123`. - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. Unlike `OFFSET` which requires scanning over the first N results to skip, a start cursor allows the query to begin at a logical position. This position is not required to match an actual result, it will scan forward from this position to find the next document. Requires: * The number of values cannot be greater than the number of fields specified in the `ORDER BY` clause..google.firestore.v1.Cursor start_at = 7;- Returns:
- Whether the startAt field is set.
-
getStartAt
Cursor getStartAt()A potential prefix of a position in the result set to start the query at. The ordering of the result set is based on the `ORDER BY` clause of the original query. ``` SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; ``` This query's results are ordered by `(b ASC, __name__ ASC)`. Cursors can reference either the full ordering or a prefix of the location, though it cannot reference more fields than what are in the provided `ORDER BY`. Continuing off the example above, attaching the following start cursors will have varying impact: - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND b > 2 AND __name__ > /k/123`. - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. Unlike `OFFSET` which requires scanning over the first N results to skip, a start cursor allows the query to begin at a logical position. This position is not required to match an actual result, it will scan forward from this position to find the next document. Requires: * The number of values cannot be greater than the number of fields specified in the `ORDER BY` clause..google.firestore.v1.Cursor start_at = 7;- Returns:
- The startAt.
-
getStartAtOrBuilder
CursorOrBuilder getStartAtOrBuilder()A potential prefix of a position in the result set to start the query at. The ordering of the result set is based on the `ORDER BY` clause of the original query. ``` SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; ``` This query's results are ordered by `(b ASC, __name__ ASC)`. Cursors can reference either the full ordering or a prefix of the location, though it cannot reference more fields than what are in the provided `ORDER BY`. Continuing off the example above, attaching the following start cursors will have varying impact: - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND b > 2 AND __name__ > /k/123`. - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. Unlike `OFFSET` which requires scanning over the first N results to skip, a start cursor allows the query to begin at a logical position. This position is not required to match an actual result, it will scan forward from this position to find the next document. Requires: * The number of values cannot be greater than the number of fields specified in the `ORDER BY` clause..google.firestore.v1.Cursor start_at = 7; -
hasEndAt
boolean hasEndAt()A potential prefix of a position in the result set to end the query at. This is similar to `START_AT` but with it controlling the end position rather than the start position. Requires: * The number of values cannot be greater than the number of fields specified in the `ORDER BY` clause.
.google.firestore.v1.Cursor end_at = 8;- Returns:
- Whether the endAt field is set.
-
getEndAt
Cursor getEndAt()A potential prefix of a position in the result set to end the query at. This is similar to `START_AT` but with it controlling the end position rather than the start position. Requires: * The number of values cannot be greater than the number of fields specified in the `ORDER BY` clause.
.google.firestore.v1.Cursor end_at = 8;- Returns:
- The endAt.
-
getEndAtOrBuilder
CursorOrBuilder getEndAtOrBuilder()A potential prefix of a position in the result set to end the query at. This is similar to `START_AT` but with it controlling the end position rather than the start position. Requires: * The number of values cannot be greater than the number of fields specified in the `ORDER BY` clause.
.google.firestore.v1.Cursor end_at = 8; -
getOffset
int getOffset()The number of documents to skip before returning the first result. This applies after the constraints specified by the `WHERE`, `START AT`, & `END AT` but before the `LIMIT` clause. Requires: * The value must be greater than or equal to zero if specified.
int32 offset = 6;- Returns:
- The offset.
-
hasLimit
boolean hasLimit()The maximum number of results to return. Applies after all other constraints. Requires: * The value must be greater than or equal to zero if specified.
.google.protobuf.Int32Value limit = 5;- Returns:
- Whether the limit field is set.
-
getLimit
com.google.protobuf.Int32Value getLimit()The maximum number of results to return. Applies after all other constraints. Requires: * The value must be greater than or equal to zero if specified.
.google.protobuf.Int32Value limit = 5;- Returns:
- The limit.
-
getLimitOrBuilder
com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder()The maximum number of results to return. Applies after all other constraints. Requires: * The value must be greater than or equal to zero if specified.
.google.protobuf.Int32Value limit = 5;
-