# Google Cloud Sql Admin V1 Client - Class QueryResult (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 QueryResult.

QueryResult contains the result of executing a single SQL statement.

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

## Namespace

Google \\ Cloud \\ Sql \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ columns` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.Column>` List of columns included in the result. This also includes the data type of the column. |
| `↳ rows` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.Row>` Rows returned by the SQL statement. |
| `↳ message` | `string` Message related to the SQL execution result. |
| `↳ partial_result` | `bool` Set to true if the SQL execution's result is truncated due to size limits or an error retrieving results. |
| `↳ status` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html` If results were truncated due to an error, details of that error. |

### getColumns

List of columns included in the result. This also includes the data type
of the column.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.Column>` |   |

### setColumns

List of columns included in the result. This also includes the data type
of the column.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.Column>` |

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

### getRows

Rows returned by the SQL statement.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.Row>` |   |

### setRows

Rows returned by the SQL statement.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.Row>` |

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

### getMessage

Message related to the SQL execution result.

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

### setMessage

Message related to the SQL execution result.

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

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

### getPartialResult

Set to true if the SQL execution's result is truncated due to size limits
or an error retrieving results.

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

### setPartialResult

Set to true if the SQL execution's result is truncated due to size limits
or an error retrieving results.

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

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

### getStatus

If results were truncated due to an error, details of that error.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html|null` |   |

### hasStatus

### clearStatus

### setStatus

If results were truncated due to an error, details of that error.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html` |

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