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.
1168 1169 1170 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1168 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
1148 1149 1150 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1148 def is_primary_key @is_primary_key end |
#name ⇒ String
Name of the column.
Corresponds to the JSON property name
1154 1155 1156 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1154 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
1160 1161 1162 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1160 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
1166 1167 1168 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1166 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1173 1174 1175 1176 1177 1178 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1173 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 |