Class: Unconstrained::Handlers::PostgreSQLFKHandler

Inherits:
AbstractHandler show all
Defined in:
lib/unconstrained/handlers/postgresql.rb

Instance Method Summary collapse

Methods inherited from AbstractHandler

#destroy_error_key, #destroy_error_options, #handle_destroy, #handle_save, #initialize, #save_error_key, #save_error_options

Constructor Details

This class inherits a constructor from Unconstrained::Handlers::AbstractHandler

Instance Method Details

#constraint_error_columnObject



4
5
6
# File 'lib/unconstrained/handlers/postgresql.rb', line 4

def constraint_error_column
  @message =~ /DETAIL:  Key \((\w+)\)/ && $1
end

#constraint_error_tableObject



8
9
10
# File 'lib/unconstrained/handlers/postgresql.rb', line 8

def constraint_error_table
  @message =~ /referenced from table "(\w+)"/ && $1
end