# Google Cloud Sql Admin V1 Client - Class ExecuteSqlPayload (1.9.0)

1.9.0 (latest) 1.8.0 1.7.0 1.6.0 1.5.0 1.4.0 1.3.1 1.2.6 1.1.0 1.0.0 0.19.0 0.18.0 0.17.1 0.16.1 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.7.0 0.6.0 0.5.0 0.4.1 0.3.1 0.2.12 Reference documentation and code samples for the Google Cloud Sql Admin V1 Client class ExecuteSqlPayload.

The request payload used to execute SQL statements.

Generated from protobuf message `google.cloud.sql.v1.ExecuteSqlPayload`

## Namespace

Google \\ Cloud \\ Sql \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ user` | `string` Optional. The name of an existing database user to connect to the database. When `auto_iam_authn` is set to true, this field is ignored and the API caller's IAM user is used. |
| `↳ sql_statement` | `string` Required. SQL statements to run on the database. It can be a single statement or a sequence of statements separated by semicolons. |
| `↳ database` | `string` Optional. Name of the database on which the statement will be executed. |
| `↳ auto_iam_authn` | `bool` Optional. When set to `true`, the API caller identity associated with the request is used for database authentication. The API caller must be an IAM user in the database. |
| `↳ row_limit` | `int|string` Optional. The maximum number of rows returned per SQL statement. |
| `↳ partial_result_mode` | `int` Optional. Controls how the API should respond when the SQL execution result is incomplete due to the size limit or another error. The default mode is to throw an error. |
| `↳ application` | `string` Optional. Specifies the name of the application that is making the request. This field is used for telemetry. Only alphanumeric characters, dashes, and underscores are allowed. The maximum length is 32 characters. |

### getUser

Optional. The name of an existing database user to connect to the database.

When `auto_iam_authn` is set to true, this field is ignored and the API
caller's IAM user is used.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setUser

Optional. The name of an existing database user to connect to the database.

When `auto_iam_authn` is set to true, this field is ignored and the API
caller's IAM user is used.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSqlStatement

Required. SQL statements to run on the database. It can be a single
statement or a sequence of statements separated by semicolons.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setSqlStatement

Required. SQL statements to run on the database. It can be a single
statement or a sequence of statements separated by semicolons.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDatabase

Optional. Name of the database on which the statement will be executed.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setDatabase

Optional. Name of the database on which the statement will be executed.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAutoIamAuthn

Optional. When set to `true`, the API caller identity associated with the
request is used for database authentication. The API caller must be an
IAM user in the database.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### hasAutoIamAuthn

### setAutoIamAuthn

Optional. When set to `true`, the API caller identity associated with the
request is used for database authentication. The API caller must be an
IAM user in the database.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getRowLimit

Optional. The maximum number of rows returned per SQL statement.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int|string` |   |

### setRowLimit

Optional. The maximum number of rows returned per SQL statement.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int|string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getPartialResultMode

Optional. Controls how the API should respond when the SQL execution result
is incomplete due to the size limit or another error. The default mode is
to throw an error.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [PartialResultMode](https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.ExecuteSqlPayload.PartialResultMode). |

### setPartialResultMode

Optional. Controls how the API should respond when the SQL execution result
is incomplete due to the size limit or another error. The default mode is
to throw an error.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [PartialResultMode](https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.ExecuteSqlPayload.PartialResultMode). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getApplication

Optional. Specifies the name of the application that is making the request.

This field is used for telemetry. Only alphanumeric characters, dashes, and
underscores are allowed. The maximum length is 32 characters.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setApplication

Optional. Specifies the name of the application that is making the request.

This field is used for telemetry. Only alphanumeric characters, dashes, and
underscores are allowed. The maximum length is 32 characters.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getUserPassword

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |