class TypeCode

TypeCode is used as part of [Type][google.spanner.v1.Type] to indicate the type of a Cloud Spanner value.

Each legal value of a type can be encoded to or decoded from a JSON value, using the encodings described below. All Cloud Spanner values can be null, regardless of type; nulls are always encoded as a JSON null.

Protobuf enum Google\Spanner\V1\TypeCode

Constants

TYPE_CODE_UNSPECIFIED

Not specified.

Generated from protobuf enum TYPE_CODE_UNSPECIFIED = 0;

BOOL

Encoded as JSON true or false.

Generated from protobuf enum BOOL = 1;

INT64

Encoded as string, in decimal format.

Generated from protobuf enum INT64 = 2;

FLOAT64

Encoded as number, or the strings "NaN", "Infinity", or "-Infinity".

Generated from protobuf enum FLOAT64 = 3;

TIMESTAMP

Encoded as string in RFC 3339 timestamp format. The time zone must be present, and must be "Z".

Generated from protobuf enum TIMESTAMP = 4;

DATE

Encoded as string in RFC 3339 date format.

Generated from protobuf enum DATE = 5;

STRING

Encoded as string.

Generated from protobuf enum STRING = 6;

BYTES

Encoded as a base64-encoded string, as described in RFC 4648, section 4.

Generated from protobuf enum BYTES = 7;

PBARRAY

Encoded as list, where the list elements are represented according to [array_element_type][google.spanner.v1.Type.array_element_type].

Generated from protobuf enum ARRAY = 8;

STRUCT

Encoded as list, where list element i is represented according to [struct_type.fields[i]][google.spanner.v1.StructType.fields].

Generated from protobuf enum STRUCT = 9;