Class: Google::Apis::BigqueryV2::TableConstraints::ForeignKey

Inherits:
Object
  • Object
show all
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

Represents a foreign key constraint on a table's columns.

Defined Under Namespace

Classes: ColumnReference, ReferencedTable

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ForeignKey

Returns a new instance of ForeignKey.



9677
9678
9679
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9677

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

Instance Attribute Details

#column_referencesArray<Google::Apis::BigqueryV2::TableConstraints::ForeignKey::ColumnReference>

Required. The columns that compose the foreign key. Corresponds to the JSON property columnReferences



9665
9666
9667
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9665

def column_references
  @column_references
end

#nameString

Optional. Set only if the foreign key constraint is named. Corresponds to the JSON property name

Returns:

  • (String)


9670
9671
9672
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9670

def name
  @name
end

#referenced_tableGoogle::Apis::BigqueryV2::TableConstraints::ForeignKey::ReferencedTable

Corresponds to the JSON property referencedTable



9675
9676
9677
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9675

def referenced_table
  @referenced_table
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



9682
9683
9684
9685
9686
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9682

def update!(**args)
  @column_references = args[:column_references] if args.key?(:column_references)
  @name = args[:name] if args.key?(:name)
  @referenced_table = args[:referenced_table] if args.key?(:referenced_table)
end