Class: ActiveRecord::Dbt::Column::DataTest
- Inherits:
-
Object
- Object
- ActiveRecord::Dbt::Column::DataTest
- Includes:
- ActiveRecord::Dbt::Column::DataTestable::AcceptedValuesDataTestable, ActiveRecord::Dbt::Column::DataTestable::NotNullDataTestable, ActiveRecord::Dbt::Column::DataTestable::RelationshipsDataTestable, ActiveRecord::Dbt::Column::DataTestable::UniqueDataTestable
- Defined in:
- lib/active_record/dbt/column/data_test.rb
Instance Attribute Summary collapse
-
#column ⇒ Object
readonly
Returns the value of attribute column.
-
#foreign_keys ⇒ Object
readonly
Returns the value of attribute foreign_keys.
-
#primary_keys ⇒ Object
readonly
Returns the value of attribute primary_keys.
-
#table_name ⇒ Object
readonly
Returns the value of attribute table_name.
Instance Method Summary collapse
-
#initialize(table_name, column, primary_keys: [], foreign_keys: [{}]) ⇒ DataTest
constructor
A new instance of DataTest.
- #properties ⇒ Object
Methods included from ActiveRecord::Dbt::Column::DataTestable::UniqueDataTestable
Methods included from RequiredMethods
Methods included from ActiveRecord::Dbt::Column::DataTestable::RelationshipsDataTestable
Methods included from DbtPackage::Dbterd::Column::DataTestable::RelationshipsMetaRelationshipType
#relationships_meta_relationship_type
Methods included from ActiveRecord::Dbt::Column::DataTestable::NotNullDataTestable
Methods included from ActiveRecord::Dbt::Column::DataTestable::AcceptedValuesDataTestable
Constructor Details
#initialize(table_name, column, primary_keys: [], foreign_keys: [{}]) ⇒ DataTest
Returns a new instance of DataTest.
17 18 19 20 21 22 23 |
# File 'lib/active_record/dbt/column/data_test.rb', line 17 def initialize(table_name, column, primary_keys: [], foreign_keys: [{}]) @table_name = table_name @column = column @primary_keys = primary_keys @foreign_keys = foreign_keys @config = ActiveRecord::Dbt::Config.instance end |
Instance Attribute Details
#column ⇒ Object (readonly)
Returns the value of attribute column.
12 13 14 |
# File 'lib/active_record/dbt/column/data_test.rb', line 12 def column @column end |
#foreign_keys ⇒ Object (readonly)
Returns the value of attribute foreign_keys.
12 13 14 |
# File 'lib/active_record/dbt/column/data_test.rb', line 12 def foreign_keys @foreign_keys end |
#primary_keys ⇒ Object (readonly)
Returns the value of attribute primary_keys.
12 13 14 |
# File 'lib/active_record/dbt/column/data_test.rb', line 12 def primary_keys @primary_keys end |
#table_name ⇒ Object (readonly)
Returns the value of attribute table_name.
12 13 14 |
# File 'lib/active_record/dbt/column/data_test.rb', line 12 def table_name @table_name end |
Instance Method Details
#properties ⇒ Object
25 26 27 28 29 |
# File 'lib/active_record/dbt/column/data_test.rb', line 25 def properties (data_tests.keys | data_tests_overrides_hash.keys).map do |key| data_tests_overrides_hash[key] || data_tests[key] end.presence end |