1.39.4 (latest) 1.39.3 1.38.0 1.37.0 1.36.0 1.35.2 1.34.7 1.33.1 1.32.0 1.31.1 1.30.3 1.29.0 1.28.3 1.27.0 1.26.1 1.25.1 1.24.2 1.23.10 Reference documentation and code samples for the BigQuery Client class ValueMapper.

Maps values to their expected BigQuery types. This class is intended for
internal use only.

## Namespace

Google \\ Cloud \\ BigQuery

## Methods

### __construct

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `returnInt64AsObject` | `bool` If true, 64 bit integers will be returned as a [Google\\Cloud\\Core\\Int64](https://docs.cloud.google.com/php/docs/reference/cloud-core/latest/Int64.md.txt) object for 32 bit platform compatibility. |

### fromBigQuery

Maps a value coming from BigQuery to the expected format for use in the
library.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `value` | `array` The value to map. |
| `schema` | `array` The schema describing the value. |

### toBigQuery

Maps a user provided value to the expected BigQuery format.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `mixed` The value to map. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `mixed` |   |

### toParameter

Maps a value to the expected parameter format.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `mixed` The value to map. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `array` |   |

## Constants

### TYPE_BOOL

```php
Value: 'BOOL'
```

### TYPE_BOOLEAN

```php
Value: 'BOOLEAN'
```

### TYPE_INT64

```php
Value: 'INT64'
```

### TYPE_INTEGER

```php
Value: 'INTEGER'
```

### TYPE_FLOAT64

```php
Value: 'FLOAT64'
```

### TYPE_FLOAT

```php
Value: 'FLOAT'
```

### TYPE_NUMERIC

```php
Value: 'NUMERIC'
```

### TYPE_BIGNUMERIC

```php
Value: 'BIGNUMERIC'
```

### TYPE_STRING

```php
Value: 'STRING'
```

### TYPE_BYTES

```php
Value: 'BYTES'
```

### TYPE_DATE

```php
Value: 'DATE'
```

### TYPE_DATETIME

```php
Value: 'DATETIME'
```

### TYPE_TIME

```php
Value: 'TIME'
```

### TYPE_TIMESTAMP

```php
Value: 'TIMESTAMP'
```

### TYPE_ARRAY

```php
Value: 'ARRAY'
```

### TYPE_STRUCT

```php
Value: 'STRUCT'
```

### TYPE_RECORD

```php
Value: 'RECORD'
```

### TYPE_GEOGRAPHY

```php
Value: 'GEOGRAPHY'
```

### TYPE_JSON

```php
Value: 'JSON'
```

### DATETIME_FORMAT

```php
Value: 'Y-m-d H:i:s.u'
```

### DATETIME_FORMAT_INSERT

```php
Value: 'Y-m-d\TH:i:s.u'
```