publicfinalclass QueryextendsGeneratedMessageV3implementsQueryOrBuilder
A query for entities.
The query stages are executed in the following order:
- kind
- filter
- projection
- order + start_cursor + end_cursor
- offset
- limit
- find_nearest
Protobuf type google.datastore.v1.Query
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
DISTINCT_ON_FIELD_NUMBER
publicstaticfinalintDISTINCT_ON_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
END_CURSOR_FIELD_NUMBER
publicstaticfinalintEND_CURSOR_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
FILTER_FIELD_NUMBER
publicstaticfinalintFILTER_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
FIND_NEAREST_FIELD_NUMBER
publicstaticfinalintFIND_NEAREST_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
KIND_FIELD_NUMBER
publicstaticfinalintKIND_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
LIMIT_FIELD_NUMBER
publicstaticfinalintLIMIT_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
OFFSET_FIELD_NUMBER
publicstaticfinalintOFFSET_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
ORDER_FIELD_NUMBER
publicstaticfinalintORDER_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
PROJECTION_FIELD_NUMBER
publicstaticfinalintPROJECTION_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
START_CURSOR_FIELD_NUMBER
publicstaticfinalintSTART_CURSOR_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
Static Methods
getDefaultInstance()
publicstaticQuerygetDefaultInstance()
| Returns |
| Type |
Description |
Query |
getDescriptor()
publicstaticfinalDescriptors.DescriptorgetDescriptor()
newBuilder()
publicstaticQuery.BuildernewBuilder()
newBuilder(Query prototype)
publicstaticQuery.BuildernewBuilder(Queryprototype)
| Parameter |
| Name |
Description |
prototype |
Query
|
publicstaticQueryparseDelimitedFrom(InputStreaminput)
| Returns |
| Type |
Description |
Query |
publicstaticQueryparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
| Returns |
| Type |
Description |
Query |
parseFrom(byte[] data)
publicstaticQueryparseFrom(byte[]data)
| Parameter |
| Name |
Description |
data |
byte[]
|
| Returns |
| Type |
Description |
Query |
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
publicstaticQueryparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
| Returns |
| Type |
Description |
Query |
parseFrom(ByteString data)
publicstaticQueryparseFrom(ByteStringdata)
| Returns |
| Type |
Description |
Query |
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
publicstaticQueryparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
| Returns |
| Type |
Description |
Query |
publicstaticQueryparseFrom(CodedInputStreaminput)
| Returns |
| Type |
Description |
Query |
publicstaticQueryparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
| Returns |
| Type |
Description |
Query |
publicstaticQueryparseFrom(InputStreaminput)
| Returns |
| Type |
Description |
Query |
publicstaticQueryparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
| Returns |
| Type |
Description |
Query |
parseFrom(ByteBuffer data)
publicstaticQueryparseFrom(ByteBufferdata)
| Returns |
| Type |
Description |
Query |
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
publicstaticQueryparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
| Returns |
| Type |
Description |
Query |
parser()
publicstaticParser<Query>parser()
Methods
equals(Object obj)
publicbooleanequals(Objectobj)
| Parameter |
| Name |
Description |
obj |
Object
|
Overrides
getDefaultInstanceForType()
publicQuerygetDefaultInstanceForType()
| Returns |
| Type |
Description |
Query |
getDistinctOn(int index)
publicPropertyReferencegetDistinctOn(intindex)
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 in order.
repeated .google.datastore.v1.PropertyReference distinct_on = 6;
| Parameter |
| Name |
Description |
index |
int
|
getDistinctOnCount()
publicintgetDistinctOnCount()
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 in order.
repeated .google.datastore.v1.PropertyReference distinct_on = 6;
| Returns |
| Type |
Description |
int |
getDistinctOnList()
publicList<PropertyReference>getDistinctOnList()
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 in order.
repeated .google.datastore.v1.PropertyReference distinct_on = 6;
getDistinctOnOrBuilder(int index)
publicPropertyReferenceOrBuildergetDistinctOnOrBuilder(intindex)
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 in order.
repeated .google.datastore.v1.PropertyReference distinct_on = 6;
| Parameter |
| Name |
Description |
index |
int
|
getDistinctOnOrBuilderList()
publicList<?extendsPropertyReferenceOrBuilder>getDistinctOnOrBuilderList()
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 in order.
repeated .google.datastore.v1.PropertyReference distinct_on = 6;
| Returns |
| Type |
Description |
List<? extends com.google.datastore.v1.PropertyReferenceOrBuilder> |
getEndCursor()
publicByteStringgetEndCursor()
| Returns |
| Type |
Description |
ByteString |
The endCursor.
|
getFilter()
The filter to apply.
.google.datastore.v1.Filter filter = 4;
| Returns |
| Type |
Description |
Filter |
The filter.
|
getFilterOrBuilder()
publicFilterOrBuildergetFilterOrBuilder()
The filter to apply.
.google.datastore.v1.Filter filter = 4;
getFindNearest()
publicFindNearestgetFindNearest()
Optional. A potential Nearest Neighbors Search.
Applies after all other filters and ordering.
Finds the closest vector embeddings to the given query vector.
.google.datastore.v1.FindNearest find_nearest = 13 [(.google.api.field_behavior) = OPTIONAL];
getFindNearestOrBuilder()
publicFindNearestOrBuildergetFindNearestOrBuilder()
Optional. A potential Nearest Neighbors Search.
Applies after all other filters and ordering.
Finds the closest vector embeddings to the given query vector.
.google.datastore.v1.FindNearest find_nearest = 13 [(.google.api.field_behavior) = OPTIONAL];
getKind(int index)
publicKindExpressiongetKind(intindex)
The kinds to query (if empty, returns entities of all kinds).
Currently at most 1 kind may be specified.
repeated .google.datastore.v1.KindExpression kind = 3;
| Parameter |
| Name |
Description |
index |
int
|
getKindCount()
The kinds to query (if empty, returns entities of all kinds).
Currently at most 1 kind may be specified.
repeated .google.datastore.v1.KindExpression kind = 3;
| Returns |
| Type |
Description |
int |
getKindList()
publicList<KindExpression>getKindList()
The kinds to query (if empty, returns entities of all kinds).
Currently at most 1 kind may be specified.
repeated .google.datastore.v1.KindExpression kind = 3;
getKindOrBuilder(int index)
publicKindExpressionOrBuildergetKindOrBuilder(intindex)
The kinds to query (if empty, returns entities of all kinds).
Currently at most 1 kind may be specified.
repeated .google.datastore.v1.KindExpression kind = 3;
| Parameter |
| Name |
Description |
index |
int
|
getKindOrBuilderList()
publicList<?extendsKindExpressionOrBuilder>getKindOrBuilderList()
The kinds to query (if empty, returns entities of all kinds).
Currently at most 1 kind may be specified.
repeated .google.datastore.v1.KindExpression kind = 3;
| Returns |
| Type |
Description |
List<? extends com.google.datastore.v1.KindExpressionOrBuilder> |
getLimit()
publicInt32ValuegetLimit()
The maximum number of results to return. Applies after all other
constraints. Optional.
Unspecified is interpreted as no limit.
Must be >= 0 if specified.
.google.protobuf.Int32Value limit = 12;
getLimitOrBuilder()
publicInt32ValueOrBuildergetLimitOrBuilder()
The maximum number of results to return. Applies after all other
constraints. Optional.
Unspecified is interpreted as no limit.
Must be >= 0 if specified.
.google.protobuf.Int32Value limit = 12;
getOffset()
The number of results to skip. Applies before limit, but after all other
constraints. Optional. Must be >= 0 if specified.
int32 offset = 10;
| Returns |
| Type |
Description |
int |
The offset.
|
getOrder(int index)
publicPropertyOrdergetOrder(intindex)
The order to apply to the query results (if empty, order is unspecified).
repeated .google.datastore.v1.PropertyOrder order = 5;
| Parameter |
| Name |
Description |
index |
int
|
getOrderCount()
The order to apply to the query results (if empty, order is unspecified).
repeated .google.datastore.v1.PropertyOrder order = 5;
| Returns |
| Type |
Description |
int |
getOrderList()
publicList<PropertyOrder>getOrderList()
The order to apply to the query results (if empty, order is unspecified).
repeated .google.datastore.v1.PropertyOrder order = 5;
getOrderOrBuilder(int index)
publicPropertyOrderOrBuildergetOrderOrBuilder(intindex)
The order to apply to the query results (if empty, order is unspecified).
repeated .google.datastore.v1.PropertyOrder order = 5;
| Parameter |
| Name |
Description |
index |
int
|
getOrderOrBuilderList()
publicList<?extendsPropertyOrderOrBuilder>getOrderOrBuilderList()
The order to apply to the query results (if empty, order is unspecified).
repeated .google.datastore.v1.PropertyOrder order = 5;
| Returns |
| Type |
Description |
List<? extends com.google.datastore.v1.PropertyOrderOrBuilder> |
getParserForType()
publicParser<Query>getParserForType()
Overrides
getProjection(int index)
publicProjectiongetProjection(intindex)
The projection to return. Defaults to returning all properties.
repeated .google.datastore.v1.Projection projection = 2;
| Parameter |
| Name |
Description |
index |
int
|
getProjectionCount()
publicintgetProjectionCount()
The projection to return. Defaults to returning all properties.
repeated .google.datastore.v1.Projection projection = 2;
| Returns |
| Type |
Description |
int |
getProjectionList()
publicList<Projection>getProjectionList()
The projection to return. Defaults to returning all properties.
repeated .google.datastore.v1.Projection projection = 2;
getProjectionOrBuilder(int index)
publicProjectionOrBuildergetProjectionOrBuilder(intindex)
The projection to return. Defaults to returning all properties.
repeated .google.datastore.v1.Projection projection = 2;
| Parameter |
| Name |
Description |
index |
int
|
getProjectionOrBuilderList()
publicList<?extendsProjectionOrBuilder>getProjectionOrBuilderList()
The projection to return. Defaults to returning all properties.
repeated .google.datastore.v1.Projection projection = 2;
| Returns |
| Type |
Description |
List<? extends com.google.datastore.v1.ProjectionOrBuilder> |
getSerializedSize()
publicintgetSerializedSize()
| Returns |
| Type |
Description |
int |
Overrides
getStartCursor()
publicByteStringgetStartCursor()
| Returns |
| Type |
Description |
ByteString |
The startCursor.
|
hasFilter()
The filter to apply.
.google.datastore.v1.Filter filter = 4;
| Returns |
| Type |
Description |
boolean |
Whether the filter field is set.
|
hasFindNearest()
publicbooleanhasFindNearest()
Optional. A potential Nearest Neighbors Search.
Applies after all other filters and ordering.
Finds the closest vector embeddings to the given query vector.
.google.datastore.v1.FindNearest find_nearest = 13 [(.google.api.field_behavior) = OPTIONAL];
| Returns |
| Type |
Description |
boolean |
Whether the findNearest field is set.
|
hasLimit()
The maximum number of results to return. Applies after all other
constraints. Optional.
Unspecified is interpreted as no limit.
Must be >= 0 if specified.
.google.protobuf.Int32Value limit = 12;
| Returns |
| Type |
Description |
boolean |
Whether the limit field is set.
|
hashCode()
| Returns |
| Type |
Description |
int |
Overrides
internalGetFieldAccessorTable()
protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Overrides
isInitialized()
publicfinalbooleanisInitialized()
Overrides
newBuilderForType()
publicQuery.BuildernewBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protectedQuery.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
| Returns |
| Type |
Description |
Object |
Overrides
toBuilder()
publicQuery.BuildertoBuilder()
writeTo(CodedOutputStream output)
publicvoidwriteTo(CodedOutputStreamoutput)
Overrides