Class: Google::Apis::SpannerV1::ColumnMetadata
- Inherits:
-
Object
- Object
- Google::Apis::SpannerV1::ColumnMetadata
- 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
Metadata for a column.
Instance Attribute Summary collapse
-
#is_primary_key ⇒ Boolean
(also: #is_primary_key?)
Indicates whether the column is a primary key column.
-
#name ⇒ String
Name of the column.
-
#ordinal_position ⇒ Fixnum
Ordinal position of the column based on the original table definition in the schema starting with a value of 1.
-
#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.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ColumnMetadata
constructor
A new instance of ColumnMetadata.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ColumnMetadata
Returns a new instance of ColumnMetadata.
1133 1134 1135 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1133 def initialize(**args) update!(**args) end |
Instance Attribute Details
#is_primary_key ⇒ Boolean Also known as: is_primary_key?
Indicates whether the column is a primary key column.
Corresponds to the JSON property isPrimaryKey
1113 1114 1115 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1113 def is_primary_key @is_primary_key end |
#name ⇒ String
Name of the column.
Corresponds to the JSON property name
1119 1120 1121 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1119 def name @name end |
#ordinal_position ⇒ Fixnum
Ordinal position of the column based on the original table definition in the
schema starting with a value of 1.
Corresponds to the JSON property ordinalPosition
1125 1126 1127 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1125 def ordinal_position @ordinal_position end |
#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 type
1131 1132 1133 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1131 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1138 1139 1140 1141 1142 1143 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1138 def update!(**args) @is_primary_key = args[:is_primary_key] if args.key?(:is_primary_key) @name = args[:name] if args.key?(:name) @ordinal_position = args[:ordinal_position] if args.key?(:ordinal_position) @type = args[:type] if args.key?(:type) end |