Class: Google::Apis::BigqueryV2::TableConstraints
- Inherits:
-
Object
- Object
- Google::Apis::BigqueryV2::TableConstraints
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/bigquery_v2/classes.rb,
lib/google/apis/bigquery_v2/representations.rb,
lib/google/apis/bigquery_v2/representations.rb
Overview
The TableConstraints defines the primary key and foreign key.
Defined Under Namespace
Classes: ForeignKey, PrimaryKey
Instance Attribute Summary collapse
-
#foreign_keys ⇒ Array<Google::Apis::BigqueryV2::TableConstraints::ForeignKey>
Optional.
-
#primary_key ⇒ Google::Apis::BigqueryV2::TableConstraints::PrimaryKey
Represents the primary key constraint on a table's columns.
Instance Method Summary collapse
-
#initialize(**args) ⇒ TableConstraints
constructor
A new instance of TableConstraints.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ TableConstraints
Returns a new instance of TableConstraints.
9672 9673 9674 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9672 def initialize(**args) update!(**args) end |
Instance Attribute Details
#foreign_keys ⇒ Array<Google::Apis::BigqueryV2::TableConstraints::ForeignKey>
Optional. Present only if the table has a foreign key. The foreign key is not
enforced.
Corresponds to the JSON property foreignKeys
9665 9666 9667 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9665 def foreign_keys @foreign_keys end |
#primary_key ⇒ Google::Apis::BigqueryV2::TableConstraints::PrimaryKey
Represents the primary key constraint on a table's columns.
Corresponds to the JSON property primaryKey
9670 9671 9672 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9670 def primary_key @primary_key end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
9677 9678 9679 9680 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9677 def update!(**args) @foreign_keys = args[:foreign_keys] if args.key?(:foreign_keys) @primary_key = args[:primary_key] if args.key?(:primary_key) end |