Class: Google::Apis::DatamigrationV1::ConstraintEntity
- Inherits:
-
Object
- Object
- Google::Apis::DatamigrationV1::ConstraintEntity
- 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
Constraint is not used as an independent entity, it is retrieved as part of another entity such as Table or View.
Instance Attribute Summary collapse
-
#custom_features ⇒ Hash<String,Object>
Custom engine specific features.
-
#name ⇒ String
The name of the table constraint.
-
#reference_columns ⇒ Array<String>
Reference columns which may be associated with the constraint.
-
#reference_table ⇒ String
Reference table which may be associated with the constraint.
-
#table_columns ⇒ Array<String>
Table columns used as part of the Constraint, for example primary key constraint should list the columns which constitutes the key.
-
#table_name ⇒ String
Table which is associated with the constraint.
-
#type ⇒ String
Type of constraint, for example unique, primary key, foreign key (currently only primary key is supported).
Instance Method Summary collapse
-
#initialize(**args) ⇒ ConstraintEntity
constructor
A new instance of ConstraintEntity.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ConstraintEntity
Returns a new instance of ConstraintEntity.
1101 1102 1103 |
# File 'lib/google/apis/datamigration_v1/classes.rb', line 1101 def initialize(**args) update!(**args) end |
Instance Attribute Details
#custom_features ⇒ Hash<String,Object>
Custom engine specific features.
Corresponds to the JSON property customFeatures
1060 1061 1062 |
# File 'lib/google/apis/datamigration_v1/classes.rb', line 1060 def custom_features @custom_features end |
#name ⇒ String
The name of the table constraint.
Corresponds to the JSON property name
1065 1066 1067 |
# File 'lib/google/apis/datamigration_v1/classes.rb', line 1065 def name @name end |
#reference_columns ⇒ Array<String>
Reference columns which may be associated with the constraint. For example, if
the constraint is a FOREIGN_KEY, this represents the list of full names of
referenced columns by the foreign key.
Corresponds to the JSON property referenceColumns
1072 1073 1074 |
# File 'lib/google/apis/datamigration_v1/classes.rb', line 1072 def reference_columns @reference_columns end |
#reference_table ⇒ String
Reference table which may be associated with the constraint. For example, if
the constraint is a FOREIGN_KEY, this represents the list of full name of the
referenced table by the foreign key.
Corresponds to the JSON property referenceTable
1079 1080 1081 |
# File 'lib/google/apis/datamigration_v1/classes.rb', line 1079 def reference_table @reference_table end |
#table_columns ⇒ Array<String>
Table columns used as part of the Constraint, for example primary key
constraint should list the columns which constitutes the key.
Corresponds to the JSON property tableColumns
1085 1086 1087 |
# File 'lib/google/apis/datamigration_v1/classes.rb', line 1085 def table_columns @table_columns end |
#table_name ⇒ String
Table which is associated with the constraint. In case the constraint is
defined on a table, this field is left empty as this information is stored in
parent_name. However, if constraint is defined on a view, this field stores
the table name on which the view is defined.
Corresponds to the JSON property tableName
1093 1094 1095 |
# File 'lib/google/apis/datamigration_v1/classes.rb', line 1093 def table_name @table_name end |
#type ⇒ String
Type of constraint, for example unique, primary key, foreign key (currently
only primary key is supported).
Corresponds to the JSON property type
1099 1100 1101 |
# File 'lib/google/apis/datamigration_v1/classes.rb', line 1099 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1106 1107 1108 1109 1110 1111 1112 1113 1114 |
# File 'lib/google/apis/datamigration_v1/classes.rb', line 1106 def update!(**args) @custom_features = args[:custom_features] if args.key?(:custom_features) @name = args[:name] if args.key?(:name) @reference_columns = args[:reference_columns] if args.key?(:reference_columns) @reference_table = args[:reference_table] if args.key?(:reference_table) @table_columns = args[:table_columns] if args.key?(:table_columns) @table_name = args[:table_name] if args.key?(:table_name) @type = args[:type] if args.key?(:type) end |