Package com.google.datastore.v1
Class Query
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
com.google.datastore.v1.Query
- All Implemented Interfaces:
QueryOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
A query for entities. The query stages are executed in the following order: 1. kind 2. filter 3. projection 4. order + start_cursor + end_cursor 5. offset 6. limit 7. find_nearestProtobuf type
google.datastore.v1.Query- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessageV3
alwaysUseFieldBuilders, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic Querystatic final com.google.protobuf.Descriptors.DescriptorgetDistinctOn(int index) The properties to make distinct.intThe properties to make distinct.The properties to make distinct.getDistinctOnOrBuilder(int index) The properties to make distinct.List<? extends PropertyReferenceOrBuilder>The properties to make distinct.com.google.protobuf.ByteStringAn ending point for the query results.The filter to apply.The filter to apply.Optional.Optional.getKind(int index) The kinds to query (if empty, returns entities of all kinds).intThe kinds to query (if empty, returns entities of all kinds).The kinds to query (if empty, returns entities of all kinds).getKindOrBuilder(int index) The kinds to query (if empty, returns entities of all kinds).List<? extends KindExpressionOrBuilder>The kinds to query (if empty, returns entities of all kinds).com.google.protobuf.Int32ValuegetLimit()The maximum number of results to return.com.google.protobuf.Int32ValueOrBuilderThe maximum number of results to return.intThe number of results to skip.getOrder(int index) The order to apply to the query results (if empty, order is unspecified).intThe order to apply to the query results (if empty, order is unspecified).The order to apply to the query results (if empty, order is unspecified).getOrderOrBuilder(int index) The order to apply to the query results (if empty, order is unspecified).List<? extends PropertyOrderOrBuilder>The order to apply to the query results (if empty, order is unspecified).com.google.protobuf.Parser<Query>getProjection(int index) The projection to return.intThe projection to return.The projection to return.getProjectionOrBuilder(int index) The projection to return.List<? extends ProjectionOrBuilder>The projection to return.intcom.google.protobuf.ByteStringA starting point for the query results.booleanThe filter to apply.booleanOptional.inthashCode()booleanhasLimit()The maximum number of results to return.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanstatic Query.Builderstatic Query.BuildernewBuilder(Query prototype) protected Query.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) static QueryparseDelimitedFrom(InputStream input) static QueryparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static QueryparseFrom(byte[] data) static QueryparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static QueryparseFrom(com.google.protobuf.ByteString data) static QueryparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static QueryparseFrom(com.google.protobuf.CodedInputStream input) static QueryparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static QueryparseFrom(InputStream input) static QueryparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static QueryparseFrom(ByteBuffer data) static QueryparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<Query>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
PROJECTION_FIELD_NUMBER
public static final int PROJECTION_FIELD_NUMBER- See Also:
-
KIND_FIELD_NUMBER
public static final int KIND_FIELD_NUMBER- See Also:
-
FILTER_FIELD_NUMBER
public static final int FILTER_FIELD_NUMBER- See Also:
-
ORDER_FIELD_NUMBER
public static final int ORDER_FIELD_NUMBER- See Also:
-
DISTINCT_ON_FIELD_NUMBER
public static final int DISTINCT_ON_FIELD_NUMBER- See Also:
-
START_CURSOR_FIELD_NUMBER
public static final int START_CURSOR_FIELD_NUMBER- See Also:
-
END_CURSOR_FIELD_NUMBER
public static final int END_CURSOR_FIELD_NUMBER- See Also:
-
OFFSET_FIELD_NUMBER
public static final int OFFSET_FIELD_NUMBER- See Also:
-
LIMIT_FIELD_NUMBER
public static final int LIMIT_FIELD_NUMBER- See Also:
-
FIND_NEAREST_FIELD_NUMBER
public static final int FIND_NEAREST_FIELD_NUMBER- See Also:
-
-
Method Details
-
newInstance
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getProjectionList
The projection to return. Defaults to returning all properties.
repeated .google.datastore.v1.Projection projection = 2;- Specified by:
getProjectionListin interfaceQueryOrBuilder
-
getProjectionOrBuilderList
The projection to return. Defaults to returning all properties.
repeated .google.datastore.v1.Projection projection = 2;- Specified by:
getProjectionOrBuilderListin interfaceQueryOrBuilder
-
getProjectionCount
public int getProjectionCount()The projection to return. Defaults to returning all properties.
repeated .google.datastore.v1.Projection projection = 2;- Specified by:
getProjectionCountin interfaceQueryOrBuilder
-
getProjection
The projection to return. Defaults to returning all properties.
repeated .google.datastore.v1.Projection projection = 2;- Specified by:
getProjectionin interfaceQueryOrBuilder
-
getProjectionOrBuilder
The projection to return. Defaults to returning all properties.
repeated .google.datastore.v1.Projection projection = 2;- Specified by:
getProjectionOrBuilderin interfaceQueryOrBuilder
-
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;- Specified by:
getKindListin interfaceQueryOrBuilder
-
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;- Specified by:
getKindOrBuilderListin interfaceQueryOrBuilder
-
getKindCount
public 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;- Specified by:
getKindCountin interfaceQueryOrBuilder
-
getKind
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;- Specified by:
getKindin interfaceQueryOrBuilder
-
getKindOrBuilder
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;- Specified by:
getKindOrBuilderin interfaceQueryOrBuilder
-
hasFilter
public boolean hasFilter()The filter to apply.
.google.datastore.v1.Filter filter = 4;- Specified by:
hasFilterin interfaceQueryOrBuilder- Returns:
- Whether the filter field is set.
-
getFilter
The filter to apply.
.google.datastore.v1.Filter filter = 4;- Specified by:
getFilterin interfaceQueryOrBuilder- Returns:
- The filter.
-
getFilterOrBuilder
The filter to apply.
.google.datastore.v1.Filter filter = 4;- Specified by:
getFilterOrBuilderin interfaceQueryOrBuilder
-
getOrderList
The order to apply to the query results (if empty, order is unspecified).
repeated .google.datastore.v1.PropertyOrder order = 5;- Specified by:
getOrderListin interfaceQueryOrBuilder
-
getOrderOrBuilderList
The order to apply to the query results (if empty, order is unspecified).
repeated .google.datastore.v1.PropertyOrder order = 5;- Specified by:
getOrderOrBuilderListin interfaceQueryOrBuilder
-
getOrderCount
public int getOrderCount()The order to apply to the query results (if empty, order is unspecified).
repeated .google.datastore.v1.PropertyOrder order = 5;- Specified by:
getOrderCountin interfaceQueryOrBuilder
-
getOrder
The order to apply to the query results (if empty, order is unspecified).
repeated .google.datastore.v1.PropertyOrder order = 5;- Specified by:
getOrderin interfaceQueryOrBuilder
-
getOrderOrBuilder
The order to apply to the query results (if empty, order is unspecified).
repeated .google.datastore.v1.PropertyOrder order = 5;- Specified by:
getOrderOrBuilderin interfaceQueryOrBuilder
-
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;- Specified by:
getDistinctOnListin interfaceQueryOrBuilder
-
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;- Specified by:
getDistinctOnOrBuilderListin interfaceQueryOrBuilder
-
getDistinctOnCount
public int getDistinctOnCount()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;- Specified by:
getDistinctOnCountin interfaceQueryOrBuilder
-
getDistinctOn
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;- Specified by:
getDistinctOnin interfaceQueryOrBuilder
-
getDistinctOnOrBuilder
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;- Specified by:
getDistinctOnOrBuilderin interfaceQueryOrBuilder
-
getStartCursor
public com.google.protobuf.ByteString getStartCursor()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](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
bytes start_cursor = 7;- Specified by:
getStartCursorin interfaceQueryOrBuilder- Returns:
- The startCursor.
-
getEndCursor
public com.google.protobuf.ByteString getEndCursor()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](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
bytes end_cursor = 8;- Specified by:
getEndCursorin interfaceQueryOrBuilder- Returns:
- The endCursor.
-
getOffset
public int getOffset()The number of results to skip. Applies before limit, but after all other constraints. Optional. Must be >= 0 if specified.
int32 offset = 10;- Specified by:
getOffsetin interfaceQueryOrBuilder- Returns:
- The offset.
-
hasLimit
public boolean 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;- Specified by:
hasLimitin interfaceQueryOrBuilder- Returns:
- Whether the limit field is set.
-
getLimit
public com.google.protobuf.Int32Value getLimit()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;- Specified by:
getLimitin interfaceQueryOrBuilder- Returns:
- The limit.
-
getLimitOrBuilder
public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder()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;- Specified by:
getLimitOrBuilderin interfaceQueryOrBuilder
-
hasFindNearest
public boolean hasFindNearest()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];- Specified by:
hasFindNearestin interfaceQueryOrBuilder- Returns:
- Whether the findNearest field is set.
-
getFindNearest
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];- Specified by:
getFindNearestin interfaceQueryOrBuilder- Returns:
- The findNearest.
-
getFindNearestOrBuilder
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];- Specified by:
getFindNearestOrBuilderin interfaceQueryOrBuilder
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static Query parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Query parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Query parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Query parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Query parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Query parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Query parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static Query parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Query parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Query.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) - Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-