Class: Google::Apis::DatamigrationV1::ColumnEntity

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

Overview

Column is not used as an independent entity, it is retrieved as part of a Table entity.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ColumnEntity

Returns a new instance of ColumnEntity.



772
773
774
# File 'lib/google/apis/datamigration_v1/classes.rb', line 772

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

Instance Attribute Details

#arrayBoolean Also known as: array?

Is the column of array type. Corresponds to the JSON property array

Returns:

  • (Boolean)


680
681
682
# File 'lib/google/apis/datamigration_v1/classes.rb', line 680

def array
  @array
end

#array_lengthFixnum

If the column is array, of which length. Corresponds to the JSON property arrayLength

Returns:

  • (Fixnum)


686
687
688
# File 'lib/google/apis/datamigration_v1/classes.rb', line 686

def array_length
  @array_length
end

#auto_generatedBoolean Also known as: auto_generated?

Is the column auto-generated/identity. Corresponds to the JSON property autoGenerated

Returns:

  • (Boolean)


691
692
693
# File 'lib/google/apis/datamigration_v1/classes.rb', line 691

def auto_generated
  @auto_generated
end

#charsetString

Charset override - instead of table level charset. Corresponds to the JSON property charset

Returns:

  • (String)


697
698
699
# File 'lib/google/apis/datamigration_v1/classes.rb', line 697

def charset
  @charset
end

#collationString

Collation override - instead of table level collation. Corresponds to the JSON property collation

Returns:

  • (String)


702
703
704
# File 'lib/google/apis/datamigration_v1/classes.rb', line 702

def collation
  @collation
end

#commentString

Comment associated with the column. Corresponds to the JSON property comment

Returns:

  • (String)


707
708
709
# File 'lib/google/apis/datamigration_v1/classes.rb', line 707

def comment
  @comment
end

#custom_featuresHash<String,Object>

Custom engine specific features. Corresponds to the JSON property customFeatures

Returns:

  • (Hash<String,Object>)


712
713
714
# File 'lib/google/apis/datamigration_v1/classes.rb', line 712

def custom_features
  @custom_features
end

#data_typeString

Column data type. Corresponds to the JSON property dataType

Returns:

  • (String)


717
718
719
# File 'lib/google/apis/datamigration_v1/classes.rb', line 717

def data_type
  @data_type
end

#default_valueString

Default value of the column. Corresponds to the JSON property defaultValue

Returns:

  • (String)


722
723
724
# File 'lib/google/apis/datamigration_v1/classes.rb', line 722

def default_value
  @default_value
end

#fractional_seconds_precisionFixnum

Column fractional second precision - used for timestamp based datatypes. Corresponds to the JSON property fractionalSecondsPrecision

Returns:

  • (Fixnum)


727
728
729
# File 'lib/google/apis/datamigration_v1/classes.rb', line 727

def fractional_seconds_precision
  @fractional_seconds_precision
end

#lengthFixnum

Column length - e.g. varchar (50). Corresponds to the JSON property length

Returns:

  • (Fixnum)


732
733
734
# File 'lib/google/apis/datamigration_v1/classes.rb', line 732

def length
  @length
end

#nameString

Column name. Corresponds to the JSON property name

Returns:

  • (String)


737
738
739
# File 'lib/google/apis/datamigration_v1/classes.rb', line 737

def name
  @name
end

#nullableBoolean Also known as: nullable?

Is the column nullable. Corresponds to the JSON property nullable

Returns:

  • (Boolean)


742
743
744
# File 'lib/google/apis/datamigration_v1/classes.rb', line 742

def nullable
  @nullable
end

#ordinal_positionFixnum

Column order in the table. Corresponds to the JSON property ordinalPosition

Returns:

  • (Fixnum)


748
749
750
# File 'lib/google/apis/datamigration_v1/classes.rb', line 748

def ordinal_position
  @ordinal_position
end

#precisionFixnum

Column precision - when relevant. Corresponds to the JSON property precision

Returns:

  • (Fixnum)


753
754
755
# File 'lib/google/apis/datamigration_v1/classes.rb', line 753

def precision
  @precision
end

#scaleFixnum

Column scale - when relevant. Corresponds to the JSON property scale

Returns:

  • (Fixnum)


758
759
760
# File 'lib/google/apis/datamigration_v1/classes.rb', line 758

def scale
  @scale
end

#set_valuesArray<String>

Specifies the list of values allowed in the column. Only used for set data type. Corresponds to the JSON property setValues

Returns:

  • (Array<String>)


764
765
766
# File 'lib/google/apis/datamigration_v1/classes.rb', line 764

def set_values
  @set_values
end

#udtBoolean Also known as: udt?

Is the column a UDT. Corresponds to the JSON property udt

Returns:

  • (Boolean)


769
770
771
# File 'lib/google/apis/datamigration_v1/classes.rb', line 769

def udt
  @udt
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
# File 'lib/google/apis/datamigration_v1/classes.rb', line 777

def update!(**args)
  @array = args[:array] if args.key?(:array)
  @array_length = args[:array_length] if args.key?(:array_length)
  @auto_generated = args[:auto_generated] if args.key?(:auto_generated)
  @charset = args[:charset] if args.key?(:charset)
  @collation = args[:collation] if args.key?(:collation)
  @comment = args[:comment] if args.key?(:comment)
  @custom_features = args[:custom_features] if args.key?(:custom_features)
  @data_type = args[:data_type] if args.key?(:data_type)
  @default_value = args[:default_value] if args.key?(:default_value)
  @fractional_seconds_precision = args[:fractional_seconds_precision] if args.key?(:fractional_seconds_precision)
  @length = args[:length] if args.key?(:length)
  @name = args[:name] if args.key?(:name)
  @nullable = args[:nullable] if args.key?(:nullable)
  @ordinal_position = args[:ordinal_position] if args.key?(:ordinal_position)
  @precision = args[:precision] if args.key?(:precision)
  @scale = args[:scale] if args.key?(:scale)
  @set_values = args[:set_values] if args.key?(:set_values)
  @udt = args[:udt] if args.key?(:udt)
end