Class GqlQuery.Builder (2.28.2)

publicstaticfinalclass GqlQuery.BuilderextendsGeneratedMessageV3.Builder<GqlQuery.Builder>implementsGqlQueryOrBuilder

A GQL query.

Protobuf type google.datastore.v1.GqlQuery

Implements

GqlQueryOrBuilder

Inherited Members

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

Methods

addAllPositionalBindings(Iterable<? extends GqlQueryParameter> values)

publicGqlQuery.BuilderaddAllPositionalBindings(Iterable<?extendsGqlQueryParameter>values)

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.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Parameter
Name Description
values Iterable<? extends com.google.datastore.v1.GqlQueryParameter>
Returns
Type Description
GqlQuery.Builder

addPositionalBindings(GqlQueryParameter value)

publicGqlQuery.BuilderaddPositionalBindings(GqlQueryParametervalue)

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.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Parameter
Name Description
value GqlQueryParameter
Returns
Type Description
GqlQuery.Builder

addPositionalBindings(GqlQueryParameter.Builder builderForValue)

publicGqlQuery.BuilderaddPositionalBindings(GqlQueryParameter.BuilderbuilderForValue)

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.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Parameter
Name Description
builderForValue GqlQueryParameter.Builder
Returns
Type Description
GqlQuery.Builder

addPositionalBindings(int index, GqlQueryParameter value)

publicGqlQuery.BuilderaddPositionalBindings(intindex,GqlQueryParametervalue)

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.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Parameters
Name Description
index int
value GqlQueryParameter
Returns
Type Description
GqlQuery.Builder

addPositionalBindings(int index, GqlQueryParameter.Builder builderForValue)

publicGqlQuery.BuilderaddPositionalBindings(intindex,GqlQueryParameter.BuilderbuilderForValue)

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.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Parameters
Name Description
index int
builderForValue GqlQueryParameter.Builder
Returns
Type Description
GqlQuery.Builder

addPositionalBindingsBuilder()

publicGqlQueryParameter.BuilderaddPositionalBindingsBuilder()

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.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Returns
Type Description
GqlQueryParameter.Builder

addPositionalBindingsBuilder(int index)

publicGqlQueryParameter.BuilderaddPositionalBindingsBuilder(intindex)

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.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Parameter
Name Description
index int
Returns
Type Description
GqlQueryParameter.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicGqlQuery.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
GqlQuery.Builder
Overrides

build()

publicGqlQuerybuild()
Returns
Type Description
GqlQuery

buildPartial()

publicGqlQuerybuildPartial()
Returns
Type Description
GqlQuery

clear()

publicGqlQuery.Builderclear()
Returns
Type Description
GqlQuery.Builder
Overrides

clearAllowLiterals()

publicGqlQuery.BuilderclearAllowLiterals()

When 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.

bool allow_literals = 2;

Returns
Type Description
GqlQuery.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

publicGqlQuery.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
GqlQuery.Builder
Overrides

clearNamedBindings()

publicGqlQuery.BuilderclearNamedBindings()
Returns
Type Description
GqlQuery.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

publicGqlQuery.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
GqlQuery.Builder
Overrides

clearPositionalBindings()

publicGqlQuery.BuilderclearPositionalBindings()

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.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Returns
Type Description
GqlQuery.Builder

clearQueryString()

publicGqlQuery.BuilderclearQueryString()

A string of the format described here.

string query_string = 1;

Returns
Type Description
GqlQuery.Builder

This builder for chaining.

clone()

publicGqlQuery.Builderclone()
Returns
Type Description
GqlQuery.Builder
Overrides

containsNamedBindings(String key)

publicbooleancontainsNamedBindings(Stringkey)

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_$, must not match regex __.__, and must not be "".

map<string, .google.datastore.v1.GqlQueryParameter> named_bindings = 5;

Parameter
Name Description
key String
Returns
Type Description
boolean

getAllowLiterals()

publicbooleangetAllowLiterals()

When 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.

bool allow_literals = 2;

Returns
Type Description
boolean

The allowLiterals.

getDefaultInstanceForType()

publicGqlQuerygetDefaultInstanceForType()
Returns
Type Description
GqlQuery

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getMutableNamedBindings() (deprecated)

publicMap<String,GqlQueryParameter>getMutableNamedBindings()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,GqlQueryParameter>

getNamedBindings() (deprecated)

publicMap<String,GqlQueryParameter>getNamedBindings()
Returns
Type Description
Map<String,GqlQueryParameter>

getNamedBindingsCount()

publicintgetNamedBindingsCount()

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_$, must not match regex __.__, and must not be "".

map<string, .google.datastore.v1.GqlQueryParameter> named_bindings = 5;

Returns
Type Description
int

getNamedBindingsMap()

publicMap<String,GqlQueryParameter>getNamedBindingsMap()

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_$, must not match regex __.__, and must not be "".

map<string, .google.datastore.v1.GqlQueryParameter> named_bindings = 5;

Returns
Type Description
Map<String,GqlQueryParameter>

getNamedBindingsOrDefault(String key, GqlQueryParameter defaultValue)

publicGqlQueryParametergetNamedBindingsOrDefault(Stringkey,GqlQueryParameterdefaultValue)

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_$, must not match regex __.__, and must not be "".

map<string, .google.datastore.v1.GqlQueryParameter> named_bindings = 5;

Parameters
Name Description
key String
defaultValue GqlQueryParameter
Returns
Type Description
GqlQueryParameter

getNamedBindingsOrThrow(String key)

publicGqlQueryParametergetNamedBindingsOrThrow(Stringkey)

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_$, must not match regex __.__, and must not be "".

map<string, .google.datastore.v1.GqlQueryParameter> named_bindings = 5;

Parameter
Name Description
key String
Returns
Type Description
GqlQueryParameter

getPositionalBindings(int index)

publicGqlQueryParametergetPositionalBindings(intindex)

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.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Parameter
Name Description
index int
Returns
Type Description
GqlQueryParameter

getPositionalBindingsBuilder(int index)

publicGqlQueryParameter.BuildergetPositionalBindingsBuilder(intindex)

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.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Parameter
Name Description
index int
Returns
Type Description
GqlQueryParameter.Builder

getPositionalBindingsBuilderList()

publicList<GqlQueryParameter.Builder>getPositionalBindingsBuilderList()

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.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Returns
Type Description
List<Builder>

getPositionalBindingsCount()

publicintgetPositionalBindingsCount()

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.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Returns
Type Description
int

getPositionalBindingsList()

publicList<GqlQueryParameter>getPositionalBindingsList()

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.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Returns
Type Description
List<GqlQueryParameter>

getPositionalBindingsOrBuilder(int index)

publicGqlQueryParameterOrBuildergetPositionalBindingsOrBuilder(intindex)

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.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Parameter
Name Description
index int
Returns
Type Description
GqlQueryParameterOrBuilder

getPositionalBindingsOrBuilderList()

publicList<?extendsGqlQueryParameterOrBuilder>getPositionalBindingsOrBuilderList()

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.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Returns
Type Description
List<? extends com.google.datastore.v1.GqlQueryParameterOrBuilder>

getQueryString()

publicStringgetQueryString()

A string of the format described here.

string query_string = 1;

Returns
Type Description
String

The queryString.

getQueryStringBytes()

publicByteStringgetQueryStringBytes()

A string of the format described here.

string query_string = 1;

Returns
Type Description
ByteString

The bytes for queryString.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protectedMapFieldReflectionAccessorinternalGetMapFieldReflection(intnumber)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protectedMapFieldReflectionAccessorinternalGetMutableMapFieldReflection(intnumber)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(GqlQuery other)

publicGqlQuery.BuildermergeFrom(GqlQueryother)
Parameter
Name Description
other GqlQuery
Returns
Type Description
GqlQuery.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicGqlQuery.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GqlQuery.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

publicGqlQuery.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
GqlQuery.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalGqlQuery.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
GqlQuery.Builder
Overrides

putAllNamedBindings(Map<String,GqlQueryParameter> values)

publicGqlQuery.BuilderputAllNamedBindings(Map<String,GqlQueryParameter>values)

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_$, must not match regex __.__, and must not be "".

map<string, .google.datastore.v1.GqlQueryParameter> named_bindings = 5;

Parameter
Name Description
values Map<String,GqlQueryParameter>
Returns
Type Description
GqlQuery.Builder

putNamedBindings(String key, GqlQueryParameter value)

publicGqlQuery.BuilderputNamedBindings(Stringkey,GqlQueryParametervalue)

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_$, must not match regex __.__, and must not be "".

map<string, .google.datastore.v1.GqlQueryParameter> named_bindings = 5;

Parameters
Name Description
key String
value GqlQueryParameter
Returns
Type Description
GqlQuery.Builder

putNamedBindingsBuilderIfAbsent(String key)

publicGqlQueryParameter.BuilderputNamedBindingsBuilderIfAbsent(Stringkey)

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_$, must not match regex __.__, and must not be "".

map<string, .google.datastore.v1.GqlQueryParameter> named_bindings = 5;

Parameter
Name Description
key String
Returns
Type Description
GqlQueryParameter.Builder

removeNamedBindings(String key)

publicGqlQuery.BuilderremoveNamedBindings(Stringkey)

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_$, must not match regex __.__, and must not be "".

map<string, .google.datastore.v1.GqlQueryParameter> named_bindings = 5;

Parameter
Name Description
key String
Returns
Type Description
GqlQuery.Builder

removePositionalBindings(int index)

publicGqlQuery.BuilderremovePositionalBindings(intindex)

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.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Parameter
Name Description
index int
Returns
Type Description
GqlQuery.Builder

setAllowLiterals(boolean value)

publicGqlQuery.BuildersetAllowLiterals(booleanvalue)

When 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.

bool allow_literals = 2;

Parameter
Name Description
value boolean

The allowLiterals to set.

Returns
Type Description
GqlQuery.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

publicGqlQuery.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
GqlQuery.Builder
Overrides

setPositionalBindings(int index, GqlQueryParameter value)

publicGqlQuery.BuildersetPositionalBindings(intindex,GqlQueryParametervalue)

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.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Parameters
Name Description
index int
value GqlQueryParameter
Returns
Type Description
GqlQuery.Builder

setPositionalBindings(int index, GqlQueryParameter.Builder builderForValue)

publicGqlQuery.BuildersetPositionalBindings(intindex,GqlQueryParameter.BuilderbuilderForValue)

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.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Parameters
Name Description
index int
builderForValue GqlQueryParameter.Builder
Returns
Type Description
GqlQuery.Builder

setQueryString(String value)

publicGqlQuery.BuildersetQueryString(Stringvalue)

A string of the format described here.

string query_string = 1;

Parameter
Name Description
value String

The queryString to set.

Returns
Type Description
GqlQuery.Builder

This builder for chaining.

setQueryStringBytes(ByteString value)

publicGqlQuery.BuildersetQueryStringBytes(ByteStringvalue)

A string of the format described here.

string query_string = 1;

Parameter
Name Description
value ByteString

The bytes for queryString to set.

Returns
Type Description
GqlQuery.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

publicGqlQuery.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
GqlQuery.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalGqlQuery.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
GqlQuery.Builder
Overrides

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年11月19日 UTC.