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.
9619 9620 9621 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9619 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
9612 9613 9614 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9612 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
9617 9618 9619 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9617 def primary_key @primary_key end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
9624 9625 9626 9627 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9624 def update!(**args) @foreign_keys = args[:foreign_keys] if args.key?(:foreign_keys) @primary_key = args[:primary_key] if args.key?(:primary_key) end |