# Class Value (6.118.0)

6.118.0 (latest) 6.116.0 6.111.1 6.108.0 6.107.0 6.103.0 6.102.1 6.101.1 6.100.0 6.99.0 6.98.1 6.97.1 6.96.1 6.95.1 6.94.0 6.93.0 6.89.0 6.88.0 6.87.0 6.86.0 6.85.0 6.83.0 6.82.0 6.80.1 6.79.0 6.77.0 6.74.1 6.72.0 6.71.0 6.69.0 6.68.0 6.66.0 6.65.1 6.62.0 6.60.0 6.58.0 6.57.0 6.56.0 6.55.0 6.54.0 6.53.0 6.52.1 6.51.0 6.50.1 6.49.0 6.25.1 6.24.0 6.23.4 6.22.0 6.21.2 6.20.0 6.19.1 6.18.0 6.17.4 6.14.1

    public abstract class Value implements Serializable

Represents a value to be consumed by the Cloud Spanner API. A value can be `NULL` or
non-`NULL`; regardless, values always have an associated type.

The `Value` API is optimized for construction, since this is the majority use-case when
using this class with the Cloud Spanner libraries. The factory method signatures and internal
representations are design to minimize memory usage and object creation while still maintaining
the immutability contract of this class. In particular, arrays of primitive types can be
constructed without requiring boxing into collections of wrapper types. The getters in this class
are intended primarily for test purposes, and so do not share the same performance
characteristics; in particular, getters for array types may be expensive.

`Value` instances are immutable.

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> Value

## Implements

[Serializable](https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html)

## Inherited Members

[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) [Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) [Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) [Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) [Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) [Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) [Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) [Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) [Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) [Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) [Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)

## Static Fields

### COMMIT_TIMESTAMP

    public static final Timestamp COMMIT_TIMESTAMP

Placeholder value to be passed to a mutation to make Cloud Spanner store the commit timestamp
in that column. The commit timestamp is the timestamp corresponding to when Cloud Spanner
commits the transaction containing the mutation.

Note that this particular timestamp instance has no semantic meaning. In particular the
value of seconds and nanoseconds in this timestamp are meaningless. This placeholder can only
be used for columns that have set the option "(allow_commit_timestamp=true)" in the schema.

When reading the value stored in such a column, the value returned is an actual timestamp
corresponding to the commit time of the transaction, which has no relation to this placeholder.
See Also: [Transaction Semantics](https://cloud.google.com/spanner/docs/transactions#rw_transaction_semantics)

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `com.google.cloud.Timestamp` |   |

### NAN

    public static final String NAN

Constant to specify a PG Numeric NaN value.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

## Static Methods

### bool(boolean v)

    public static Value bool(boolean v)

Returns a `BOOL` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### bool(Boolean v)

    public static Value bool(Boolean v)

Returns a `BOOL` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html` the value, which may be null |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### boolArray(boolean\[\] v)

    public static Value boolArray(boolean[] v)

Returns an `ARRAY<BOOL>` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html[]` the source of element values, which may be null to produce a value for which ` isNull()` is `true` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### boolArray(boolean\[\] v, int pos, int length)

    public static Value boolArray(boolean[] v, int pos, int length)

Returns an `ARRAY<BOOL>` value that takes its elements from a region of an array.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html[]` the source of element values, which may be null to produce a value for which ` isNull()` is `true` |
| `pos` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` the start position of `v` to copy values from. Ignored if `v` is ` null`. |
| `length` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` the number of values to copy from `v`. Ignored if `v` is ` null`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### boolArray(Iterable\<Boolean\> v)

    public static Value boolArray(Iterable<Boolean> v)

Returns an `ARRAY<BOOL>` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html<https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html>` the source of element values. This may be `null` to produce a value for which `isNull()` is `true`. Individual elements may also be `null`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### bytes(ByteArray v)

    public static Value bytes(ByteArray v)

e Returns a `BYTES` value. Returns a `BYTES` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `com.google.cloud.ByteArray` the value, which may be null |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### bytesArray(Iterable\<ByteArray\> v)

    public static Value bytesArray(Iterable<ByteArray> v)

Returns an `ARRAY<BYTES>` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html<com.google.cloud.ByteArray>` the source of element values. This may be `null` to produce a value for which `isNull()` is `true`. Individual elements may also be `null`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### bytesArrayFromBase64(Iterable\<String\> base64Strings)

    public static Value bytesArrayFromBase64(Iterable<String> base64Strings)

Returns an `ARRAY<BYTES>` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `base64Strings` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` the source of element values. This may be `null` to produce a value for which `isNull()` is `true`. Individual elements may also be `null`. Non-null values must be a valid Base64 string. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### bytesFromBase64(String base64String)

    public static Value bytesFromBase64(String base64String)

Returns a `BYTES` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `base64String` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` the value in Base64 encoding, which may be null. This value must be a valid base64 string. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### date(Date v)

    public static Value date(Date v)

Returns a `DATE` value. The range \[1678-01-01, 2262-01-01) is the legal interval for
cloud spanner dates. A write to a date column is rejected if the value is outside of that
interval.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `com.google.cloud.Date` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### dateArray(Iterable\<Date\> v)

    public static Value dateArray(Iterable<Date> v)

Returns an `ARRAY<DATE>` value. The range \[1678-01-01, 2262-01-01) is the legal interval
for cloud spanner dates. A write to a date column is rejected if the value is outside of that
interval.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html<com.google.cloud.Date>` the source of element values. This may be `null` to produce a value for which `isNull()` is `true`. Individual elements may also be `null`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### float32(float v)

    public static Value float32(float v)

Returns a `FLOAT32` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### float32(Float v)

    public static Value float32(Float v)

Returns a `FLOAT32` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Float.html` the value, which may be null |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### float32Array(float\[\] v)

    public static Value float32Array(float[] v)

Returns an `ARRAY<FLOAT32>` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html[]` the source of element values, which may be null to produce a value for which ` isNull()` is `true` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### float32Array(float\[\] v, int pos, int length)

    public static Value float32Array(float[] v, int pos, int length)

Returns an `ARRAY<FLOAT32>` value that takes its elements from a region of an array.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html[]` the source of element values, which may be null to produce a value for which ` isNull()` is `true` |
| `pos` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` the start position of `v` to copy values from. Ignored if `v` is ` null`. |
| `length` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` the number of values to copy from `v`. Ignored if `v` is ` null`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### float32Array(Iterable\<Float\> v)

    public static Value float32Array(Iterable<Float> v)

Returns an `ARRAY<FLOAT32>` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html<https://docs.oracle.com/javase/8/docs/api/java/lang/Float.html>` the source of element values. This may be `null` to produce a value for which `isNull()` is `true`. Individual elements may also be `null`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### float64(double v)

    public static Value float64(double v)

Returns a `FLOAT64` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### float64(Double v)

    public static Value float64(Double v)

Returns a `FLOAT64` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html` the value, which may be null |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### float64Array(double\[\] v)

    public static Value float64Array(double[] v)

Returns an `ARRAY<FLOAT64>` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html[]` the source of element values, which may be null to produce a value for which ` isNull()` is `true` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### float64Array(double\[\] v, int pos, int length)

    public static Value float64Array(double[] v, int pos, int length)

Returns an `ARRAY<FLOAT64>` value that takes its elements from a region of an array.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html[]` the source of element values, which may be null to produce a value for which ` isNull()` is `true` |
| `pos` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` the start position of `v` to copy values from. Ignored if `v` is ` null`. |
| `length` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` the number of values to copy from `v`. Ignored if `v` is ` null`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### float64Array(Iterable\<Double\> v)

    public static Value float64Array(Iterable<Double> v)

Returns an `ARRAY<FLOAT64>` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html<https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html>` the source of element values. This may be `null` to produce a value for which `isNull()` is `true`. Individual elements may also be `null`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### int64(Long v)

    public static Value int64(Long v)

Returns an `INT64` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html` the value, which may be null |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### int64(long v)

    public static Value int64(long v)

Returns an `INT64` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### int64Array(Iterable\<Long\> v)

    public static Value int64Array(Iterable<Long> v)

Returns an `ARRAY<INT64>` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html<https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html>` the source of element values. This may be `null` to produce a value for which `isNull()` is `true`. Individual elements may also be `null`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### int64Array(long\[\] v)

    public static Value int64Array(long[] v)

Returns an `ARRAY<INT64>` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html[]` the source of element values, which may be null to produce a value for which ` isNull()` is `true` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### int64Array(long\[\] v, int pos, int length)

    public static Value int64Array(long[] v, int pos, int length)

Returns an `ARRAY<INT64>` value that takes its elements from a region of an array.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html[]` the source of element values, which may be null to produce a value for which ` isNull()` is `true` |
| `pos` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` the start position of `v` to copy values from. Ignored if `v` is ` null`. |
| `length` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` the number of values to copy from `v`. Ignored if `v` is ` null`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### interval(Interval interval)

    public static Value interval(Interval interval)

Returns a `INTERVAL` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `interval` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Interval` the value, which may be null |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### intervalArray(Iterable\<Interval\> v)

    public static Value intervalArray(Iterable<Interval> v)

Returns an `ARRAY<Interval>` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Interval>` the source of element values. This may be `null` to produce a value for which `isNull()` is `true`. Individual elements may also be `null`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### json(String v)

    public static Value json(String v)

Returns a `JSON` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` the value, which may be null |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### jsonArray(Iterable\<String\> v)

    public static Value jsonArray(Iterable<String> v)

Returns an `ARRAY<JSON>` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` the source of element values. This may be `null` to produce a value for which `isNull()` is `true`. Individual elements may also be `null`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### numeric(BigDecimal v)

    public static Value numeric(BigDecimal v)

Returns a `NUMERIC` value. The valid value range for the whole component of the [BigDecimal](https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html) is from -9,999,999,999,999,999,999,999,999 to +9,999,999,999,999,999,999,999,999
(both inclusive), i.e. the max length of the whole component is 29 digits. The max length of
the fractional part is 9 digits. Trailing zeros in the fractional part are not considered and
will be lost, as Cloud Spanner does not preserve the precision of a numeric value.

If you set a numeric value of a record to for example 0.10, Cloud Spanner will return this
value as 0.1 in subsequent queries. Use BigDecimal#stripTrailingZeros() to compare
inserted values with retrieved values if your application might insert numeric values with
trailing zeros.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html` the value, which may be null |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### numericArray(Iterable\<BigDecimal\> v)

    public static Value numericArray(Iterable<BigDecimal> v)

Returns an `ARRAY<NUMERIC>` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html<https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html>` the source of element values. This may be `null` to produce a value for which `isNull()` is `true`. Individual elements may also be `null`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### pgJsonb(String v)

    public static Value pgJsonb(String v)

Returns a `PG JSONB` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` the value, which may be null |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### pgJsonbArray(Iterable\<String\> v)

    public static Value pgJsonbArray(Iterable<String> v)

Returns an `ARRAY<JSONB>` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` the source of element values. This may be `null` to produce a value for which `isNull()` is `true`. Individual elements may also be `null`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### pgNumeric(String v)

    public static Value pgNumeric(String v)

Returns a `PG NUMERIC` value. This value has flexible precision and scale which is
specified in the Database DDL. This value also supports `NaNs`, which can be specified
with `Value.pgNumeric(Value.NAN)` or simply as `Value.pgNumeric("NaN")`.

Note that this flavour of numeric is different than Spanner numerics ([Value#numeric(BigDecimal)](https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value#com_google_cloud_spanner_Value_numeric_java_math_BigDecimal_)). It should be used only for handling numerics in the PostgreSQL
dialect.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` the value, which may be null |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### pgNumericArray(Iterable\<String\> v)

    public static Value pgNumericArray(Iterable<String> v)

Returns an `ARRAY<PG_NUMERIC>` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` the source of element values. This may be `null` to produce a value for which `isNull()` is `true`. Individual elements may also be `null`. Individual elements may be `"NaN"` or [Value#NAN](https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value#com_google_cloud_spanner_Value_NAN). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### pgOid(Long v)

    public static Value pgOid(Long v)

Returns an `PG_OID` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html` the value, which may be null |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### pgOid(long v)

    public static Value pgOid(long v)

Returns an `PG_OID` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### pgOidArray(Iterable\<Long\> v)

    public static Value pgOidArray(Iterable<Long> v)

Returns an `ARRAY<PG_OID>` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html<https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html>` the source of element values. This may be `null` to produce a value for which `isNull()` is `true`. Individual elements may also be `null`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### pgOidArray(long\[\] v)

    public static Value pgOidArray(long[] v)

Returns an `ARRAY<PG_OID>` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html[]` the source of element values, which may be null to produce a value for which ` isNull()` is `true` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### pgOidArray(long\[\] v, int pos, int length)

    public static Value pgOidArray(long[] v, int pos, int length)

Returns an `ARRAY<PG_OID>` value that takes its elements from a region of an array.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html[]` the source of element values, which may be null to produce a value for which ` isNull()` is `true` |
| `pos` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` the start position of `v` to copy values from. Ignored if `v` is ` null`. |
| `length` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` the number of values to copy from `v`. Ignored if `v` is ` null`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### protoEnum(ProtocolMessageEnum v)

    public static Value protoEnum(ProtocolMessageEnum v)

Return a `ENUM` value for not null proto messages.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ProtocolMessageEnum.html` Proto Enum, which may be null. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### protoEnum(Long v, Descriptors.EnumDescriptor enumDescriptor)

    public static Value protoEnum(Long v, Descriptors.EnumDescriptor enumDescriptor)

Return a `ENUM` value.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html` Enum non-primitive Integer constant. |
| `enumDescriptor` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.EnumDescriptor.html` Enum Type Descriptor. Use static method from proto class `* MyProtoEnum.getDescriptor()`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### protoEnum(Long v, String protoTypeFqn)

    public static Value protoEnum(Long v, String protoTypeFqn)

Return a `ENUM` value.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html` Enum non-primitive Integer constant. |
| `protoTypeFqn` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Fully qualified name of proto representing the enum definition. Use static method from proto class `MyProtoEnum.getDescriptor().getFullName()` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### protoEnum(long v, String protoTypeFqn)

    public static Value protoEnum(long v, String protoTypeFqn)

Return a `ENUM` value.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` Enum integer primitive constant. |
| `protoTypeFqn` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Fully qualified name of proto representing the enum definition. Use static method from proto class `MyProtoEnum.getDescriptor().getFullName()` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### protoEnumArray(Iterable\<ProtocolMessageEnum\> v, Descriptors.EnumDescriptor descriptor)

    public static Value protoEnumArray(Iterable<ProtocolMessageEnum> v, Descriptors.EnumDescriptor descriptor)

Returns an `ARRAY<ENUM>` value.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html<https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ProtocolMessageEnum.html>` the source of element values. This may be `null` to produce a value for which `isNull()` is `true`. Individual elements may also be `null`. |
| `descriptor` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.EnumDescriptor.html` Proto Type Descriptor, use static method from proto class ` MyProtoClass.getDescriptor()`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### protoEnumArray(Iterable\<Long\> v, String protoTypeFqn)

    public static Value protoEnumArray(Iterable<Long> v, String protoTypeFqn)

Returns an `ARRAY<ENUM>` value.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html<https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html>` the source of element values. This may be `null` to produce a value for which `isNull()` is `true`. Individual elements may also be `null`. |
| `protoTypeFqn` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Fully qualified name of proto representing the enum definition. Use static method from proto class `MyProtoEnum.getDescriptor().getFullName()` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### protoMessage(ByteArray v, Descriptors.Descriptor descriptor)

    public static Value protoMessage(ByteArray v, Descriptors.Descriptor descriptor)

Return a `PROTO` value

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `v` | `com.google.cloud.ByteArray` Serialized Proto Array, which may be null. |
| `descriptor` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.Descriptor.html` Proto Type Descriptor, use static method from proto class ` MyProtoClass.getDescriptor()`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### protoMessage(ByteArray v, String protoTypeFqn)

    public static Value protoMessage(ByteArray v, String protoTypeFqn)

Return a `PROTO` value

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `v` | `com.google.cloud.ByteArray` Serialized Proto Array, which may be null. |
| `protoTypeFqn` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Fully qualified name of proto representing the proto definition. Use static method from proto class `MyProtoClass.getDescriptor().getFullName()` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### protoMessage(AbstractMessage v)

    public static Value protoMessage(AbstractMessage v)

Return a `PROTO` value for not null proto messages.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.html` Not null Proto message. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### protoMessageArray(Iterable\<ByteArray\> v, String protoTypeFqn)

    public static Value protoMessageArray(Iterable<ByteArray> v, String protoTypeFqn)

Returns an `ARRAY<PROTO>` value.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html<com.google.cloud.ByteArray>` the source of element values. This may be `null` to produce a value for which `isNull()` is `true`. Individual elements may also be `null`. |
| `protoTypeFqn` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Fully qualified name of proto representing the proto definition. Use static method from proto class `MyProtoClass.getDescriptor().getFullName()` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### protoMessageArray(Iterable\<AbstractMessage\> v, Descriptors.Descriptor descriptor)

    public static Value protoMessageArray(Iterable<AbstractMessage> v, Descriptors.Descriptor descriptor)

Returns an `ARRAY<PROTO>` value.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html<https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.html>` the source of element values. This may be `null` to produce a value for which `isNull()` is `true`. Individual elements may also be `null`. |
| `descriptor` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.Descriptor.html` Proto Type Descriptor, use static method from proto class ` MyProtoClass.getDescriptor()`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### string(String v)

    public static Value string(String v)

Returns a `STRING` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` the value, which may be null |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### stringArray(Iterable\<String\> v)

    public static Value stringArray(Iterable<String> v)

Returns an `ARRAY<STRING>` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` the source of element values. This may be `null` to produce a value for which `isNull()` is `true`. Individual elements may also be `null`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### struct(Struct v)

    public static Value struct(Struct v)

Returns a non-`NULL` {#code STRUCT} value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Struct` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### struct(Type type, Struct v)

    public static Value struct(Type type, Struct v)

Returns a `STRUCT` value of `Type` type.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `type` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Type` the type of the `STRUCT` value |
| `v` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Struct` the struct `STRUCT` value. This may be `null` to produce a value for which `isNull()` is `true`. If non-`null`, Struct#getType() must match type. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### structArray(Type elementType, Iterable\<Struct\> v)

    public static Value structArray(Type elementType, Iterable<Struct> v)

Returns an `ARRAY<STRUCT<...>>` value.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `elementType` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Type` |
| `v` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Struct>` the source of element values. This may be `null` to produce a value for which `isNull()` is `true`. Individual elements may also be `null`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### timestamp(Timestamp v)

    public static Value timestamp(Timestamp v)

Returns a `TIMESTAMP` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `com.google.cloud.Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### timestampArray(Iterable\<Timestamp\> v)

    public static Value timestampArray(Iterable<Timestamp> v)

Returns an `ARRAY<TIMESTAMP>` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html<com.google.cloud.Timestamp>` the source of element values. This may be `null` to produce a value for which `isNull()` is `true`. Individual elements may also be `null`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### untyped(Value value)

    public static Value untyped(Value value)

Returns a [Value](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Value.html) that wraps the given proto value. This can be used to construct a value
without a specific type, and let the backend infer the type based on the statement where it is
used.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Value.html` the non-null proto value (a NullValue is allowed) |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### uuid(UUID v)

    public static Value uuid(UUID v)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/8/docs/api/java/util/UUID.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

### uuidArray(Iterable\<UUID\> v)

    public static Value uuidArray(Iterable<UUID> v)

Returns an `ARRAY<UUID>` value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html<https://docs.oracle.com/javase/8/docs/api/java/util/UUID.html>` the source of element values. This may be `null` to produce a value for which `isNull()` is `true`. Individual elements may also be `null`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value` |   |

## Methods

### \<T\>getProtoEnum(Function\<Integer,ProtocolMessageEnum\> method)

    public T <T>getProtoEnum(Function<Integer,ProtocolMessageEnum> method)

Returns the value of a `ENUM`-typed instance.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `method` | `https://docs.oracle.com/javase/8/docs/api/java/util/function/Function.html<https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html,https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ProtocolMessageEnum.html>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `T` |   |

### \<T\>getProtoEnumArray(Function\<Integer,ProtocolMessageEnum\> method)

    public List<T> <T>getProtoEnumArray(Function<Integer,ProtocolMessageEnum> method)

Returns the value of an `ARRAY<ENUM>`-typed instance. While the returned list itself will
never be `null`, elements of that list may be null.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `method` | `https://docs.oracle.com/javase/8/docs/api/java/util/function/Function.html<https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html,https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ProtocolMessageEnum.html>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<T>` |   |

### \<T\>getProtoMessage(T m)

    public T <T>getProtoMessage(T m)

Returns the value of a `PROTO`-typed instance.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `m` | `T` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `T` |   |

### \<T\>getProtoMessageArray(T m)

    public List<T> <T>getProtoMessageArray(T m)

Returns the value of an `ARRAY<PROTO>`-typed instance. While the returned list itself
will never be `null`, elements of that list may be null.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `m` | `T` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<T>` |   |

### getAsString()

    public String getAsString()

Returns this value as a raw string representation. This is guaranteed to work for all values,
regardless of the underlying data type, and is guaranteed not to be truncated.

Returns the string "NULL" for null values.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### getAsStringList()

    public ImmutableList<String> getAsStringList()

Returns this value as a list of raw string representations. This is guaranteed to work for all
values, regardless of the underlying data type, and the strings are guaranteed not to be
truncated. The method returns a singleton list for non-array values and a list containing as
many elements as there are in the array for array values. This method can be used instead of
the [#getAsString()](https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Value#com_google_cloud_spanner_Value_getAsString__) method if you need to quote the individual elements in an array.

Returns the string "NULL" for null values.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.common.collect.ImmutableList<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |   |

### getBool()

    public abstract boolean getBool()

Returns the value of a `BOOL`-typed instance.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getBoolArray()

    public abstract List<Boolean> getBoolArray()

Returns the value of an `ARRAY<BOOL>`-typed instance. While the returned list itself will
never be `null`, elements of that list may be null.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html>` |   |

### getBytes()

    public abstract ByteArray getBytes()

Returns the value of a `BYTES`-typed instance.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.cloud.ByteArray` |   |

### getBytesArray()

    public abstract List<ByteArray> getBytesArray()

Returns the value of an `ARRAY<BYTES>`-typed instance. While the returned list itself
will never be `null`, elements of that list may be null.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<com.google.cloud.ByteArray>` |   |

### getDate()

    public abstract Date getDate()

Returns the value of a `DATE`-typed instance.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.cloud.Date` |   |

### getDateArray()

    public abstract List<Date> getDateArray()

Returns the value of an `ARRAY<DATE>`-typed instance. While the returned list itself will
never be `null`, elements of that list may be null.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<com.google.cloud.Date>` |   |

### getFloat32()

    public abstract float getFloat32()

Returns the value of a `FLOAT32`-typed instance.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getFloat32Array()

    public abstract List<Float> getFloat32Array()

Returns the value of an `ARRAY<FLOAT32>`-typed instance. While the returned list itself
will never be `null`, elements of that list may be null.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/lang/Float.html>` |   |

### getFloat64()

    public abstract double getFloat64()

Returns the value of a `FLOAT64`-typed instance.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getFloat64Array()

    public abstract List<Double> getFloat64Array()

Returns the value of an `ARRAY<FLOAT64>`-typed instance. While the returned list itself
will never be `null`, elements of that list may be null.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html>` |   |

### getInt64()

    public abstract long getInt64()

Returns the value of a `INT64`-typed instance.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getInt64Array()

    public abstract List<Long> getInt64Array()

Returns the value of an `ARRAY<INT64>`-typed instance. While the returned list itself
will never be `null`, elements of that list may be null.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html>` |   |

### getInterval()

    public abstract Interval getInterval()

Returns the value of a `INTERVAL`-typed instance.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Interval` |   |

### getIntervalArray()

    public abstract List<Interval> getIntervalArray()

Returns the value of an `ARRAY<INTERVAL>`-typed instance. While the returned list itself
will never be `null`, elements of that list may be null.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Interval>` |   |

### getJson()

    public String getJson()

Returns the value of a `JSON`-typed instance.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### getJsonArray()

    public List<String> getJsonArray()

Returns the value of an `ARRAY<JSON>`-typed instance. While the returned list itself will
never be `null`, elements of that list may be null.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |   |

### getNumeric()

    public abstract BigDecimal getNumeric()

Returns the value of a `NUMERIC`-typed instance.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html` |   |

### getNumericArray()

    public abstract List<BigDecimal> getNumericArray()

Returns the value of an `ARRAY<NUMERIC>`-typed instance. While the returned list itself
will never be `null`, elements of that list may be null.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html>` |   |

### getPgJsonb()

    public String getPgJsonb()

Returns the value of a `JSONB`-typed instance.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### getPgJsonbArray()

    public List<String> getPgJsonbArray()

Returns the value of an `ARRAY<JSONB>`-typed instance. While the returned list itself
will never be `null`, elements of that list may be null.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |   |

### getString()

    public abstract String getString()

Returns the value of a `STRING`-typed instance.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### getStringArray()

    public abstract List<String> getStringArray()

Returns the value of an `ARRAY<STRING>`-typed instance. While the returned list itself
will never be `null`, elements of that list may be null.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |   |

### getStruct()

    public abstract Struct getStruct()

Returns the value of a `STRUCT`-typed instance.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Struct` |   |

### getStructArray()

    public abstract List<Struct> getStructArray()

Returns the value of an `ARRAY<STRUCT<...>>`-typed instance. While the returned list
itself will never be `null`, elements of that list may be null.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Struct>` |   |

### getTimestamp()

    public abstract Timestamp getTimestamp()

Returns the value of a `TIMESTAMP`-typed instance.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.cloud.Timestamp` |   |

### getTimestampArray()

    public abstract List<Timestamp> getTimestampArray()

Returns the value of an `ARRAY<TIMESTAMP>`-typed instance. While the returned list itself
will never be `null`, elements of that list may be null.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<com.google.cloud.Timestamp>` |   |

### getType()

    public abstract Type getType()

Returns the type of this value. This will return a type even if `isNull()` is true.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.Type` |   |

### getUuid()

    public abstract UUID getUuid()

Returns the value of a `UUID`-typed instance.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/UUID.html` |   |

### getUuidArray()

    public abstract List<UUID> getUuidArray()

Returns the value of an `ARRAY<UUID>`-typed instance. While the returned list itself will
never be `null`, elements of that list may be null.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/util/UUID.html>` |   |

### isCommitTimestamp()

    public abstract boolean isCommitTimestamp()

Returns true if this is a commit timestamp value.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### isNull()

    public abstract boolean isNull()

Returns `true` if this instance represents a `NULL` value.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### toString()

    public String toString()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

**Overrides** [Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--)