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.



4304
4305
4306
# File 'lib/google/apis/datastream_v1/classes.rb', line 4304

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

Instance Attribute Details

#columnString

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

Returns:

  • (String)


4286
4287
4288
# File 'lib/google/apis/datastream_v1/classes.rb', line 4286

def column
  @column
end

#data_typeString

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

Returns:

  • (String)


4291
4292
4293
# File 'lib/google/apis/datastream_v1/classes.rb', line 4291

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)


4296
4297
4298
# File 'lib/google/apis/datastream_v1/classes.rb', line 4296

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)


4302
4303
4304
# File 'lib/google/apis/datastream_v1/classes.rb', line 4302

def ordinal_position
  @ordinal_position
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4309
4310
4311
4312
4313
4314
# File 'lib/google/apis/datastream_v1/classes.rb', line 4309

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