Sha256: 740c74b719b8d41f2b7c8081d4f72daa1e51c3913c6fd7f9c0057ed3dcc79793
Contents?: true
Size: 740 Bytes
Versions: 44
Compression:
Stored size: 740 Bytes
Contents
# The consumer id, provider id, and consumer version order # for the latest consumer version that has a pact with that provider. def latest_pact_consumer_version_orders_v1(_connection = nil) "select provider_id, consumer_id, max(consumer_version_order) as latest_consumer_version_order from all_pact_publications group by provider_id, consumer_id" end def latest_pact_consumer_version_orders_v2(connection = nil) view = Sequel.as(:latest_pact_publication_ids_for_consumer_versions, :lp) connection.from(view) .select_group(:provider_id, :consumer_id) .select_append{ max(order).as(latest_consumer_version_order) } .join(:versions, { Sequel[:lp][:consumer_version_id] => Sequel[:cv][:id]}, { table_alias: :cv } ) end
Version data entries
44 entries across 44 versions & 1 rubygems