Class: Google::Apis::DatastreamV1::SpannerColumn

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

Overview

Spanner column.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SpannerColumn

Returns a new instance of SpannerColumn.



4722
4723
4724
# File 'lib/google/apis/datastream_v1/classes.rb', line 4722

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

Instance Attribute Details

#columnString

Required. The column name. Corresponds to the JSON property column

Returns:

  • (String)


4704
4705
4706
# File 'lib/google/apis/datastream_v1/classes.rb', line 4704

def column
  @column
end

#data_typeString

Optional. Spanner data type. Corresponds to the JSON property dataType

Returns:

  • (String)


4709
4710
4711
# File 'lib/google/apis/datastream_v1/classes.rb', line 4709

def data_type
  @data_type
end

#is_primary_keyBoolean Also known as: is_primary_key?

Optional. Whether or not the column is a primary key. Corresponds to the JSON property isPrimaryKey

Returns:

  • (Boolean)


4714
4715
4716
# File 'lib/google/apis/datastream_v1/classes.rb', line 4714

def is_primary_key
  @is_primary_key
end

#ordinal_positionFixnum

Optional. The ordinal position of the column in the table. Corresponds to the JSON property ordinalPosition

Returns:

  • (Fixnum)


4720
4721
4722
# File 'lib/google/apis/datastream_v1/classes.rb', line 4720

def ordinal_position
  @ordinal_position
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4727
4728
4729
4730
4731
4732
# File 'lib/google/apis/datastream_v1/classes.rb', line 4727

def update!(**args)
  @column = args[:column] if args.key?(:column)
  @data_type = args[:data_type] if args.key?(:data_type)
  @is_primary_key = args[:is_primary_key] if args.key?(:is_primary_key)
  @ordinal_position = args[:ordinal_position] if args.key?(:ordinal_position)
end