# Interface GqlQueryOrBuilder (3.1.0)

3.1.0 (latest) 2.40.0 2.37.0 2.36.0 2.34.0 2.33.3 2.32.3 2.31.4 2.30.0 2.29.1 2.28.2 2.27.1 2.26.4 2.25.2 2.24.3 2.23.0 2.22.0 2.21.3 2.20.2 2.19.2 2.18.5 2.17.6

    public interface GqlQueryOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### containsNamedBindings(String key)

    public abstract boolean containsNamedBindings(String key)

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` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getAllowLiterals()

    public abstract boolean getAllowLiterals()

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** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The allowLiterals. |

### getNamedBindings() (deprecated)

    public abstract Map<String,GqlQueryParameter> getNamedBindings()

Use [#getNamedBindingsMap()](https://docs.cloud.google.com/java/docs/reference/google-cloud-datastore/latest/com.google.datastore.v1.GqlQueryOrBuilder#com_google_datastore_v1_GqlQueryOrBuilder_getNamedBindingsMap__) instead.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-datastore/latest/com.google.datastore.v1.GqlQueryParameter>` |   |

### getNamedBindingsCount()

    public abstract int getNamedBindingsCount()

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** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getNamedBindingsMap()

    public abstract Map<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** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-datastore/latest/com.google.datastore.v1.GqlQueryParameter>` |   |

### getNamedBindingsOrDefault(String key, GqlQueryParameter defaultValue)

    public abstract GqlQueryParameter getNamedBindingsOrDefault(String key, GqlQueryParameter defaultValue)

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` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |
| `defaultValue` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-datastore/latest/com.google.datastore.v1.GqlQueryParameter` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-datastore/latest/com.google.datastore.v1.GqlQueryParameter` |   |

### getNamedBindingsOrThrow(String key)

    public abstract GqlQueryParameter getNamedBindingsOrThrow(String key)

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` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-datastore/latest/com.google.datastore.v1.GqlQueryParameter` |   |

### getPositionalBindings(int index)

    public abstract GqlQueryParameter getPositionalBindings(int index)

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` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-datastore/latest/com.google.datastore.v1.GqlQueryParameter` |   |

### getPositionalBindingsCount()

    public abstract int getPositionalBindingsCount()

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** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getPositionalBindingsList()

    public abstract List<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** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-datastore/latest/com.google.datastore.v1.GqlQueryParameter>` |   |

### getPositionalBindingsOrBuilder(int index)

    public abstract GqlQueryParameterOrBuilder getPositionalBindingsOrBuilder(int index)

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` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-datastore/latest/com.google.datastore.v1.GqlQueryParameterOrBuilder` |   |

### getPositionalBindingsOrBuilderList()

    public abstract List<? extends GqlQueryParameterOrBuilder> 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** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<? extends com.google.datastore.v1.GqlQueryParameterOrBuilder>` |   |

### getQueryString()

    public abstract String getQueryString()

A string of the format described
[here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).

`string query_string = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The queryString. |

### getQueryStringBytes()

    public abstract ByteString getQueryStringBytes()

A string of the format described
[here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).

`string query_string = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for queryString. |