NAME
Google::Datastore::V1beta3::Query - Compiled Protocol Buffers messages for google/datastore/v1beta3/query.proto
SYNOPSIS
use Google::Datastore::V1beta3::Query;
my $msg = Google::Datastore::V1beta3::Query::EntityResult->new({
entity => $entity,
version => $version,
cursor => $cursor,
});
# Read or update a field
my $val = $msg->entity();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Datastore::V1beta3::Query::EntityResult->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/datastore/v1beta3/query.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().
MESSAGES
Google::Datastore::V1beta3::Query::EntityResult
The result of fetching an entity from Datastore.
Inherits from Protobuf::Message.
Accessors
$msg->entity()/$msg->entity($value)Type:
Message(Google::Datastore::V1beta3::Entity::Entity)The resulting entity.
$msg->version()/$msg->version($value)Type:
Int64The version of the entity, a strictly positive number that monotonically increases with changes to the entity.
This field is set for [`FULL`][google.datastore.v1beta3.EntityResult.ResultType.FULL] entity results.
For [missing][google.datastore.v1beta3.LookupResponse.missing] entities in `LookupResponse`, this is the version of the snapshot that was used to look up the entity, and it is always set except for eventually consistent reads.
$msg->cursor()/$msg->cursor($value)Type:
BytesA cursor that points to the position after the result entity. Set only when the `EntityResult` is part of a `QueryResultBatch` message.
Enum: EntityResult::ResultType
RESULT_TYPE_UNSPECIFIED=>0FULL=>1PROJECTION=>2KEY_ONLY=>3
Google::Datastore::V1beta3::Query::Query
A query for entities.
Inherits from Protobuf::Message.
Accessors
$msg->projection()/$msg->projection($value)Type:
Message(Google::Datastore::V1beta3::Query::Projection)The projection to return. Defaults to returning all properties.
$msg->kind()/$msg->kind($value)Type:
Message(Google::Datastore::V1beta3::Query::KindExpression)The kinds to query (if empty, returns entities of all kinds). Currently at most 1 kind may be specified.
$msg->filter()/$msg->filter($value)Type:
Message(Google::Datastore::V1beta3::Query::Filter)The filter to apply.
$msg->order()/$msg->order($value)Type:
Message(Google::Datastore::V1beta3::Query::PropertyOrder)The order to apply to the query results (if empty, order is unspecified).
$msg->distinct_on()/$msg->distinct_on($value)Type:
Message(Google::Datastore::V1beta3::Query::PropertyReference)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).
$msg->start_cursor()/$msg->start_cursor($value)Type:
BytesA 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).
$msg->end_cursor()/$msg->end_cursor($value)Type:
BytesAn 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).
$msg->offset()/$msg->offset($value)Type:
Int32The number of results to skip. Applies before limit, but after all other constraints. Optional. Must be >= 0 if specified.
$msg->limit()/$msg->limit($value)Type:
Message(Google::Protobuf::Wrappers::Int32Value)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::Datastore::V1beta3::Query::KindExpression
A representation of a kind.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringThe name of the kind.
Google::Datastore::V1beta3::Query::PropertyReference
A reference to a property relative to the kind expressions.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringThe name of the property. If name includes "."s, it may be interpreted as a property name path.
Google::Datastore::V1beta3::Query::Projection
A representation of a property in a projection.
Inherits from Protobuf::Message.
Accessors
$msg->property()/$msg->property($value)Type:
Message(Google::Datastore::V1beta3::Query::PropertyReference)The property to project.
Google::Datastore::V1beta3::Query::PropertyOrder
The desired order for a specific property.
Inherits from Protobuf::Message.
Accessors
$msg->property()/$msg->property($value)Type:
Message(Google::Datastore::V1beta3::Query::PropertyReference)The property to order by.
$msg->direction()/$msg->direction($value)Type:
Enum(Google::Datastore::V1beta3::PropertyOrder::Direction)The direction to order by. Defaults to `ASCENDING`.
Enum: PropertyOrder::Direction
DIRECTION_UNSPECIFIED=>0ASCENDING=>1DESCENDING=>2
Google::Datastore::V1beta3::Query::Filter
A holder for any type of filter.
Inherits from Protobuf::Message.
Accessors
$msg->composite_filter()/$msg->composite_filter($value)Type:
Message(Google::Datastore::V1beta3::Query::CompositeFilter)A composite filter.
$msg->property_filter()/$msg->property_filter($value)Type:
Message(Google::Datastore::V1beta3::Query::PropertyFilter)A filter on a property.
Google::Datastore::V1beta3::Query::CompositeFilter
A filter that merges multiple other filters using the given operator.
Inherits from Protobuf::Message.
Accessors
$msg->op()/$msg->op($value)Type:
Enum(Google::Datastore::V1beta3::CompositeFilter::Operator)The operator for combining multiple filters.
$msg->filters()/$msg->filters($value)Type:
Message(Google::Datastore::V1beta3::Query::Filter)The list of filters to combine. Must contain at least one filter.
Enum: CompositeFilter::Operator
OPERATOR_UNSPECIFIED=>0AND=>1
Google::Datastore::V1beta3::Query::PropertyFilter
A filter on a specific property.
Inherits from Protobuf::Message.
Accessors
$msg->property()/$msg->property($value)Type:
Message(Google::Datastore::V1beta3::Query::PropertyReference)The property to filter by.
$msg->op()/$msg->op($value)Type:
Enum(Google::Datastore::V1beta3::PropertyFilter::Operator)The operator to filter by.
$msg->value()/$msg->value($value)Type:
Message(Google::Datastore::V1beta3::Entity::Value)The value to compare the property to.
Enum: PropertyFilter::Operator
OPERATOR_UNSPECIFIED=>0LESS_THAN=>1LESS_THAN_OR_EQUAL=>2GREATER_THAN=>3GREATER_THAN_OR_EQUAL=>4EQUAL=>5HAS_ANCESTOR=>11
Google::Datastore::V1beta3::Query::GqlQuery
A [GQL query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
Inherits from Protobuf::Message.
Accessors
$msg->query_string()/$msg->query_string($value)Type:
StringA string of the format described [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
$msg->allow_literals()/$msg->allow_literals($value)Type:
BoolWhen false, the query string must not contain any literals and instead must bind all values. For example, `SELECT * FROM Kind WHERE a = 'string literal'` is not allowed, while `SELECT * FROM Kind WHERE a = @value` is.
$msg->named_bindings()/$msg->named_bindings($value)Type:
Message(Google::Datastore::V1beta3::Query::GqlQuery::NamedBindingsEntry)For each non-reserved named binding site in the query string, there must be a named parameter with that name, but not necessarily the inverse.
Key must match regex `[A-Za-z_$][A-Za-z_$0-9]*`, must not match regex `__.*__`, and must not be `""`.
$msg->positional_bindings()/$msg->positional_bindings($value)Type:
Message(Google::Datastore::V1beta3::Query::GqlQueryParameter)Numbered binding site @1 references the first numbered parameter, effectively using 1-based indexing, rather than the usual 0.
For each binding site numbered i in `query_string`, there must be an i-th numbered parameter. The inverse must also be true.
Google::Datastore::V1beta3::Query::GqlQueryParameter
A binding parameter for a GQL query.
Inherits from Protobuf::Message.
Accessors
$msg->value()/$msg->value($value)Type:
Message(Google::Datastore::V1beta3::Entity::Value)A value parameter.
$msg->cursor()/$msg->cursor($value)Type:
BytesA query cursor. Query cursors are returned in query result batches.
Google::Datastore::V1beta3::Query::QueryResultBatch
A batch of results produced by a query.
Inherits from Protobuf::Message.
Accessors
$msg->skipped_results()/$msg->skipped_results($value)Type:
Int32The number of results skipped, typically because of an offset.
$msg->skipped_cursor()/$msg->skipped_cursor($value)Type:
BytesA cursor that points to the position after the last skipped result. Will be set when `skipped_results` != 0.
$msg->entity_result_type()/$msg->entity_result_type($value)Type:
Enum(Google::Datastore::V1beta3::EntityResult::ResultType)The result type for every entity in `entity_results`.
$msg->entity_results()/$msg->entity_results($value)Type:
Message(Google::Datastore::V1beta3::Query::EntityResult)The results for this batch.
$msg->end_cursor()/$msg->end_cursor($value)Type:
BytesA cursor that points to the position after the last result in the batch.
$msg->more_results()/$msg->more_results($value)Type:
Enum(Google::Datastore::V1beta3::QueryResultBatch::MoreResultsType)The state of the query after the current batch.
$msg->snapshot_version()/$msg->snapshot_version($value)Type:
Int64The version number of the snapshot this batch was returned from. This applies to the range of results from the query's `start_cursor` (or the beginning of the query if no cursor was given) to this batch's `end_cursor` (not the query's `end_cursor`).
In a single transaction, subsequent query result batches for the same query can have a greater snapshot version number. Each batch's snapshot version is valid for all preceding batches. The value will be zero for eventually consistent queries.
Enum: QueryResultBatch::MoreResultsType
MORE_RESULTS_TYPE_UNSPECIFIED=>0NOT_FINISHED=>1MORE_RESULTS_AFTER_LIMIT=>2MORE_RESULTS_AFTER_CURSOR=>4NO_MORE_RESULTS=>3
SEE ALSO
Protobuf, Protobuf::Message, Google::Datastore::V1beta3::Query::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.