# Google Cloud Data Catalog V1 Client - Class DatabaseViewSpec (2.4.2)

2.4.2 (latest) 2.4.1 2.3.2 2.2.4 2.1.0 2.0.2 1.10.3 1.9.1 1.8.2 1.7.1 1.6.0 1.5.1 1.4.2 1.3.9 Reference documentation and code samples for the Google Cloud Data Catalog V1 Client class DatabaseViewSpec.

Specification that applies to database view.

Generated from protobuf message `google.cloud.datacatalog.v1.DatabaseTableSpec.DatabaseViewSpec`

## Namespace

Google \\ Cloud \\ DataCatalog \\ V1 \\ DatabaseTableSpec

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ view_type` | `int` Type of this view. |
| `↳ base_table` | `string` Name of a singular table this view reflects one to one. |
| `↳ sql_query` | `string` SQL query used to generate this view. |

### getViewType

Type of this view.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [ViewType](https://docs.cloud.google.com/php/docs/reference/cloud-data-catalog/latest/V1.DatabaseTableSpec.DatabaseViewSpec.ViewType). |

### setViewType

Type of this view.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [ViewType](https://docs.cloud.google.com/php/docs/reference/cloud-data-catalog/latest/V1.DatabaseTableSpec.DatabaseViewSpec.ViewType). |

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

### getBaseTable

Name of a singular table this view reflects one to one.

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

### hasBaseTable

### setBaseTable

Name of a singular table this view reflects one to one.

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

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

### getSqlQuery

SQL query used to generate this view.

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

### hasSqlQuery

### setSqlQuery

SQL query used to generate this view.

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

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

### getSourceDefinition

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