Class GqlQuery.Builder<V> (2.20.0)

public static final class GqlQuery.Builder<V>

A GQL query builder.

Inheritance

java.lang.Object > GqlQuery.Builder<V>

Type Parameter

Name Description
V

Methods

addBinding(boolean[] value)

public GqlQuery.Builder<V> addBinding(boolean[] value)

Sets a new positional binding.

Parameter
Name Description
value boolean[]

a boolean value or a list of boolean values to be set as a new positional binding

Returns
Type Description
Builder<V>

addBinding(Timestamp[] value)

public GqlQuery.Builder<V> addBinding(Timestamp[] value)

Sets a new positional binding.

Parameter
Name Description
value com.google.cloud.Timestamp[]

a Timestamp object or a list of Timestamp objects to be set as a new positional binding

Returns
Type Description
Builder<V>

addBinding(Blob[] value)

public GqlQuery.Builder<V> addBinding(Blob[] value)

Sets a new positional binding.

Parameter
Name Description
value Blob[]

a Blob object or a list of Blob objects to be set as a new positional binding

Returns
Type Description
Builder<V>

addBinding(Cursor cursor)

public GqlQuery.Builder<V> addBinding(Cursor cursor)

Sets a new positional binding.

Parameter
Name Description
cursor Cursor

a Cursor object to be set as a new positional binding

Returns
Type Description
Builder<V>

addBinding(FullEntity<?>[] value) (deprecated)

public GqlQuery.Builder<V> addBinding(FullEntity<?>[] value)

Sets a new positional binding.

Parameter
Name Description
value FullEntity<?>[]

a FullEntity object or a list of FullEntity objects to be set as a new positional binding

Returns
Type Description
Builder<V>

addBinding(Key[] value)

public GqlQuery.Builder<V> addBinding(Key[] value)

Sets a new positional binding.

Parameter
Name Description
value Key[]

a Key object or a list of Key objects to be set as a new positional binding

Returns
Type Description
Builder<V>

addBinding(double[] value)

public GqlQuery.Builder<V> addBinding(double[] value)

Sets a new positional binding.

Parameter
Name Description
value double[]

a double value or a list of double values to be set as a new positional binding

Returns
Type Description
Builder<V>

addBinding(String[] value)

public GqlQuery.Builder<V> addBinding(String[] value)

Sets a new positional binding.

Parameter
Name Description
value String[]

a String object or a list of String objects to be set as a new positional binding

Returns
Type Description
Builder<V>

addBinding(long[] value)

public GqlQuery.Builder<V> addBinding(long[] value)

Sets a new positional binding.

Parameter
Name Description
value long[]

a long value or a list of long values to be set as a new positional binding

Returns
Type Description
Builder<V>

build()

public GqlQuery<V> build()
Returns
Type Description
GqlQuery<V>

clearBindings()

public GqlQuery.Builder<V> clearBindings()
Returns
Type Description
Builder<V>

setAllowLiteral(boolean allowLiteral)

public GqlQuery.Builder<V> setAllowLiteral(boolean allowLiteral)

Sets whether the query string can contain literals. When false, the query string must not contain any literals and instead must bind all values.

Parameter
Name Description
allowLiteral boolean
Returns
Type Description
Builder<V>

setBinding(String name, boolean[] value)

public GqlQuery.Builder<V> setBinding(String name, boolean[] value)

Sets a new named binding.

Parameters
Name Description
name String

name of the binding

value boolean[]

a boolean value or a list of boolean values that binds to a given name

Returns
Type Description
Builder<V>

setBinding(String name, Timestamp[] value)

public GqlQuery.Builder<V> setBinding(String name, Timestamp[] value)

Sets a new named binding.

Parameters
Name Description
name String

name of the binding

value com.google.cloud.Timestamp[]

a Timestamp object or a list of Timestamp objects that binds to a given name

Returns
Type Description
Builder<V>

setBinding(String name, Blob[] value)

public GqlQuery.Builder<V> setBinding(String name, Blob[] value)

Sets a new named binding.

Parameters
Name Description
name String

name of the binding

value Blob[]

a Blob object or list of Blob objects that binds to a given name

Returns
Type Description
Builder<V>

setBinding(String name, Cursor cursor)

public GqlQuery.Builder<V> setBinding(String name, Cursor cursor)

Sets a new named binding.

Parameters
Name Description
name String

name of the binding

cursor Cursor

a Cursor object that binds to a given name

Returns
Type Description
Builder<V>

setBinding(String name, FullEntity<?>[] value) (deprecated)

public GqlQuery.Builder<V> setBinding(String name, FullEntity<?>[] value)

Sets a new named binding.

Parameters
Name Description
name String

name of the binding

value FullEntity<?>[]

a FullEntity object or a list of FullEntity objects that binds to a given name

Returns
Type Description
Builder<V>

setBinding(String name, Key[] value)

public GqlQuery.Builder<V> setBinding(String name, Key[] value)

Sets a new named binding.

Parameters
Name Description
name String

name of the binding

value Key[]

a Key object or a list of Key objects that binds to a given name

Returns
Type Description
Builder<V>

setBinding(String name, double[] value)

public GqlQuery.Builder<V> setBinding(String name, double[] value)

Sets a new named binding.

Parameters
Name Description
name String

name of the binding

value double[]

a double value or a list of double values that binds to a given name

Returns
Type Description
Builder<V>

setBinding(String name, String[] value)

public GqlQuery.Builder<V> setBinding(String name, String[] value)

Sets a new named binding.

Parameters
Name Description
name String

name of the binding

value String[]

a String object or a list of String objects that binds to a given name

Returns
Type Description
Builder<V>

setBinding(String name, long[] value)

public GqlQuery.Builder<V> setBinding(String name, long[] value)

Sets a new named binding.

Parameters
Name Description
name String

name of the binding

value long[]

a long value or a list of long values that binds to a given name

Returns
Type Description
Builder<V>

setNamespace(String namespace)

public GqlQuery.Builder<V> setNamespace(String namespace)

Sets the namespace for the GQL query.

Parameter
Name Description
namespace String
Returns
Type Description
Builder<V>

setNullBinding(String name)

public GqlQuery.Builder<V> setNullBinding(String name)

Sets a new named binding with null value.

Parameter
Name Description
name String

of the binding

Returns
Type Description
Builder<V>

setQuery(String query)

public GqlQuery.Builder<V> setQuery(String query)

Sets the GQL query.

Parameter
Name Description
query String
Returns
Type Description
Builder<V>