Class: Google::Apis::DatastreamV1::MysqlColumn

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

MySQL Column.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ MysqlColumn

Returns a new instance of MysqlColumn.



1110
1111
1112
# File 'lib/google/apis/datastream_v1/classes.rb', line 1110

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

Instance Attribute Details

#collationString

Column collation. Corresponds to the JSON property collation

Returns:

  • (String)


1065
1066
1067
# File 'lib/google/apis/datastream_v1/classes.rb', line 1065

def collation
  @collation
end

#columnString

Column name. Corresponds to the JSON property column

Returns:

  • (String)


1070
1071
1072
# File 'lib/google/apis/datastream_v1/classes.rb', line 1070

def column
  @column
end

#data_typeString

The MySQL data type. Full data types list can be found here: https://dev.mysql. com/doc/refman/8.0/en/data-types.html Corresponds to the JSON property dataType

Returns:

  • (String)


1076
1077
1078
# File 'lib/google/apis/datastream_v1/classes.rb', line 1076

def data_type
  @data_type
end

#lengthFixnum

Column length. Corresponds to the JSON property length

Returns:

  • (Fixnum)


1081
1082
1083
# File 'lib/google/apis/datastream_v1/classes.rb', line 1081

def length
  @length
end

#nullableBoolean Also known as: nullable?

Whether or not the column can accept a null value. Corresponds to the JSON property nullable

Returns:

  • (Boolean)


1086
1087
1088
# File 'lib/google/apis/datastream_v1/classes.rb', line 1086

def nullable
  @nullable
end

#ordinal_positionFixnum

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

Returns:

  • (Fixnum)


1092
1093
1094
# File 'lib/google/apis/datastream_v1/classes.rb', line 1092

def ordinal_position
  @ordinal_position
end

#precisionFixnum

Column precision. Corresponds to the JSON property precision

Returns:

  • (Fixnum)


1097
1098
1099
# File 'lib/google/apis/datastream_v1/classes.rb', line 1097

def precision
  @precision
end

#primary_keyBoolean Also known as: primary_key?

Whether or not the column represents a primary key. Corresponds to the JSON property primaryKey

Returns:

  • (Boolean)


1102
1103
1104
# File 'lib/google/apis/datastream_v1/classes.rb', line 1102

def primary_key
  @primary_key
end

#scaleFixnum

Column scale. Corresponds to the JSON property scale

Returns:

  • (Fixnum)


1108
1109
1110
# File 'lib/google/apis/datastream_v1/classes.rb', line 1108

def scale
  @scale
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
# File 'lib/google/apis/datastream_v1/classes.rb', line 1115

def update!(**args)
  @collation = args[:collation] if args.key?(:collation)
  @column = args[:column] if args.key?(:column)
  @data_type = args[:data_type] if args.key?(:data_type)
  @length = args[:length] if args.key?(:length)
  @nullable = args[:nullable] if args.key?(:nullable)
  @ordinal_position = args[:ordinal_position] if args.key?(:ordinal_position)
  @precision = args[:precision] if args.key?(:precision)
  @primary_key = args[:primary_key] if args.key?(:primary_key)
  @scale = args[:scale] if args.key?(:scale)
end