@@ -42,10 +42,6 @@ class QuickRow < Sequel::Model(Sequel.as(:latest_pact_publication_ids_for_consum
42
42
Sequel [ :lp ] [ :consumer_id ] , Sequel [ :consumers ] [ :name ] . as ( :consumer_name ) ,
43
43
Sequel [ :lp ] [ :provider_id ] , Sequel [ :providers ] [ :name ] . as ( :provider_name )
44
44
]
45
- PACTICIPANT_VERSION_IDS = [
46
- Sequel [ :lp ] [ :consumer_version_id ] ,
47
- Sequel [ :lv ] [ :provider_version_id ]
48
- ]
49
45
50
46
associate ( :many_to_one , :pact_publication , :class => "PactBroker::Pacts::PactPublication" , :key => :pact_publication_id , :primary_key => :id )
51
47
associate ( :many_to_one , :provider , :class => "PactBroker::Domain::Pacticipant" , :key => :provider_id , :primary_key => :id )
@@ -63,12 +59,9 @@ class QuickRow < Sequel::Model(Sequel.as(:latest_pact_publication_ids_for_consum
63
59
select *SELECT_ALL_COLUMN_ARGS
64
60
65
61
def distinct_integrations selectors
66
- select ( *( PACTICIPANT_NAMES_AND_IDS + PACTICIPANT_VERSION_IDS ) )
62
+ select ( *( PACTICIPANT_NAMES_AND_IDS ) )
67
63
. distinct
68
64
. matching_selectors ( selectors )
69
- . from_self
70
- . select ( :consumer_name , :consumer_id , :provider_name , :provider_id )
71
- . distinct
72
65
end
73
66
74
67
def matching_selectors selectors
@@ -107,9 +100,8 @@ def matching_multiple_selectors(selectors)
107
100
QueryBuilder . either_consumer_or_provider_was_specified_in_query ( selectors , :lp )
108
101
)
109
102
}
110
- . from_self ( alias : :t9 )
111
103
. where {
112
- QueryBuilder . provider_or_provider_version_matches_selectors ( selectors , true , :t9 )
104
+ QueryBuilder . provider_or_provider_version_matches_selectors ( selectors , true , :lv )
113
105
}
114
106
end
115
107
0 commit comments