Class: Google::Apis::SpannerV1::Type
- Inherits:
-
Object
- Object
- Google::Apis::SpannerV1::Type
- 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
-
#array_element_type ⇒ Google::Apis::SpannerV1::Type
Typeindicates the type of a Cloud Spanner value, as might be stored in a table cell or returned from an SQL query. -
#code ⇒ String
Required.
-
#proto_type_fqn ⇒ String
If code == PROTO or code == ENUM, then
proto_type_fqnis the fully qualified name of the proto type representing the proto/enum definition. -
#struct_type ⇒ Google::Apis::SpannerV1::StructType
StructTypedefines the fields of a STRUCT type. -
#type_annotation ⇒ String
The TypeAnnotationCode that disambiguates SQL type that Spanner will use to represent values of this type during query processing.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Type
constructor
A new instance of Type.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Type
Returns a new instance of Type.
6885 6886 6887 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 6885 def initialize(**args) update!(**args) end |
Instance Attribute Details
#array_element_type ⇒ Google::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
6857 6858 6859 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 6857 def array_element_type @array_element_type end |
#code ⇒ String
Required. The TypeCode for this type.
Corresponds to the JSON property code
6862 6863 6864 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 6862 def code @code end |
#proto_type_fqn ⇒ String
If code == PROTO or code == ENUM, then proto_type_fqn is the fully qualified
name of the proto type representing the proto/enum definition.
Corresponds to the JSON property protoTypeFqn
6868 6869 6870 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 6868 def proto_type_fqn @proto_type_fqn end |
#struct_type ⇒ Google::Apis::SpannerV1::StructType
StructType defines the fields of a STRUCT type.
Corresponds to the JSON property structType
6873 6874 6875 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 6873 def struct_type @struct_type end |
#type_annotation ⇒ String
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
6883 6884 6885 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 6883 def type_annotation @type_annotation end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
6890 6891 6892 6893 6894 6895 6896 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 6890 def update!(**args) @array_element_type = args[:array_element_type] if args.key?(:array_element_type) @code = args[:code] if args.key?(:code) @proto_type_fqn = args[:proto_type_fqn] if args.key?(:proto_type_fqn) @struct_type = args[:struct_type] if args.key?(:struct_type) @type_annotation = args[:type_annotation] if args.key?(:type_annotation) end |