Class: Google::Apis::SpannerV1::Type

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/spanner_v1/classes.rb,
lib/google/apis/spanner_v1/representations.rb,
lib/google/apis/spanner_v1/representations.rb

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Type

Returns a new instance of Type.



5019
5020
5021
# File 'lib/google/apis/spanner_v1/classes.rb', line 5019

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#array_element_typeGoogle::Apis::SpannerV1::Type

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



4997
4998
4999
# File 'lib/google/apis/spanner_v1/classes.rb', line 4997

def array_element_type
  @array_element_type
end

#codeString

Required. The TypeCode for this type. Corresponds to the JSON property code

Returns:

  • (String)


5002
5003
5004
# File 'lib/google/apis/spanner_v1/classes.rb', line 5002

def code
  @code
end

#struct_typeGoogle::Apis::SpannerV1::StructType

StructType defines the fields of a STRUCT type. Corresponds to the JSON property structType



5007
5008
5009
# File 'lib/google/apis/spanner_v1/classes.rb', line 5007

def struct_type
  @struct_type
end

#type_annotationString

The TypeAnnotationCode that disambiguates SQL type that Spanner will use to represent values of this type during query processing. This is necessary for some type codes because a single TypeCode can be mapped to different SQL types depending on the SQL dialect. type_annotation typically is not needed to process the content of a value (it doesn't affect serialization) and clients can ignore it on the read path. Corresponds to the JSON property typeAnnotation

Returns:

  • (String)


5017
5018
5019
# File 'lib/google/apis/spanner_v1/classes.rb', line 5017

def type_annotation
  @type_annotation
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5024
5025
5026
5027
5028
5029
# File 'lib/google/apis/spanner_v1/classes.rb', line 5024

def update!(**args)
  @array_element_type = args[:array_element_type] if args.key?(:array_element_type)
  @code = args[:code] if args.key?(:code)
  @struct_type = args[:struct_type] if args.key?(:struct_type)
  @type_annotation = args[:type_annotation] if args.key?(:type_annotation)
end