class Type extends Message

Type indicates the type of a Cloud Spanner value, as might be stored in a table cell or returned from an SQL query.

Protobuf type Google\Spanner\V1\Type

Methods

__construct()

No description

int
getCode()

Required. The [TypeCode][google.spanner.v1.TypeCode] for this type.

setCode(int $var)

Required. The [TypeCode][google.spanner.v1.TypeCode] for this type.

getArrayElementType()

If [code][google.spanner.v1.Type.code] == [ARRAY][google.spanner.v1.TypeCode.ARRAY], then array_element_type is the type of the array elements.

setArrayElementType(Type $var)

If [code][google.spanner.v1.Type.code] == [ARRAY][google.spanner.v1.TypeCode.ARRAY], then array_element_type is the type of the array elements.

getStructType()

If [code][google.spanner.v1.Type.code] == [STRUCT][google.spanner.v1.TypeCode.STRUCT], then struct_type provides type information for the struct's fields.

setStructType(StructType $var)

If [code][google.spanner.v1.Type.code] == [STRUCT][google.spanner.v1.TypeCode.STRUCT], then struct_type provides type information for the struct's fields.

Details

at line 40
__construct()

at line 51
int getCode()

Required. The [TypeCode][google.spanner.v1.TypeCode] for this type.

Generated from protobuf field .google.spanner.v1.TypeCode code = 1;

Return Value

int

at line 62
setCode(int $var)

Required. The [TypeCode][google.spanner.v1.TypeCode] for this type.

Generated from protobuf field .google.spanner.v1.TypeCode code = 1;

Parameters

int $var

at line 75
Type getArrayElementType()

If [code][google.spanner.v1.Type.code] == [ARRAY][google.spanner.v1.TypeCode.ARRAY], then array_element_type is the type of the array elements.

Generated from protobuf field .google.spanner.v1.Type array_element_type = 2;

Return Value

Type

at line 87
setArrayElementType(Type $var)

If [code][google.spanner.v1.Type.code] == [ARRAY][google.spanner.v1.TypeCode.ARRAY], then array_element_type is the type of the array elements.

Generated from protobuf field .google.spanner.v1.Type array_element_type = 2;

Parameters

Type $var

at line 100
StructType getStructType()

If [code][google.spanner.v1.Type.code] == [STRUCT][google.spanner.v1.TypeCode.STRUCT], then struct_type provides type information for the struct's fields.

Generated from protobuf field .google.spanner.v1.StructType struct_type = 3;

Return Value

StructType

at line 112
setStructType(StructType $var)

If [code][google.spanner.v1.Type.code] == [STRUCT][google.spanner.v1.TypeCode.STRUCT], then struct_type provides type information for the struct's fields.

Generated from protobuf field .google.spanner.v1.StructType struct_type = 3;

Parameters

StructType $var