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 \ BigQueryMethods
__construct
| Parameter | |
|---|---|
| Name | Description |
returnInt64AsObject |
bool
If true, 64 bit integers will be returned as a Google\Cloud\Core\Int64 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
Value: 'BOOL'TYPE_BOOLEAN
Value: 'BOOLEAN'TYPE_INT64
Value: 'INT64'TYPE_INTEGER
Value: 'INTEGER'TYPE_FLOAT64
Value: 'FLOAT64'TYPE_FLOAT
Value: 'FLOAT'TYPE_NUMERIC
Value: 'NUMERIC'TYPE_BIGNUMERIC
Value: 'BIGNUMERIC'TYPE_STRING
Value: 'STRING'TYPE_BYTES
Value: 'BYTES'TYPE_DATE
Value: 'DATE'TYPE_DATETIME
Value: 'DATETIME'TYPE_TIME
Value: 'TIME'TYPE_TIMESTAMP
Value: 'TIMESTAMP'TYPE_ARRAY
Value: 'ARRAY'TYPE_STRUCT
Value: 'STRUCT'TYPE_RECORD
Value: 'RECORD'TYPE_GEOGRAPHY
Value: 'GEOGRAPHY'TYPE_JSON
Value: 'JSON'DATETIME_FORMAT
Value: 'Y-m-d H:i:s.u'DATETIME_FORMAT_INSERT
Value: 'Y-m-d\TH:i:s.u'