Class: YeetDba::InvalidColumn

Inherits:
Object
  • Object
show all
Defined in:
lib/yeet_dba/models/invalid_column.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(table_name:, column:, verify_data:) ⇒ InvalidColumn

Returns a new instance of InvalidColumn.



7
8
9
10
11
# File 'lib/yeet_dba/models/invalid_column.rb', line 7

def initialize(table_name:, column:, verify_data:)
  @table_name = table_name
  @column = column
  @verify_data = verify_data
end

Instance Attribute Details

#columnObject

Returns the value of attribute column.



3
4
5
# File 'lib/yeet_dba/models/invalid_column.rb', line 3

def column
  @column
end

#table_nameObject

Returns the value of attribute table_name.



3
4
5
# File 'lib/yeet_dba/models/invalid_column.rb', line 3

def table_name
  @table_name
end

#verify_dataObject

Returns the value of attribute verify_data.



3
4
5
# File 'lib/yeet_dba/models/invalid_column.rb', line 3

def verify_data
  @verify_data
end

Instance Method Details

#to_sObject



16
17
18
# File 'lib/yeet_dba/models/invalid_column.rb', line 16

def to_s
  "#{table_name} . #{db_column.name} has #{orphaned_rows_count} invalid rows with foreign table #{association_table_name}"
end