Sha256: 0936a0563178f00b46a26f2cc2f94d212e8573758f569af79ded30750f162d21
Contents?: true
Size: 1.47 KB
Versions: 53
Compression:
Stored size: 1.47 KB
Contents
def head_pact_tags_v1(connection) connection.from(Sequel.as(:latest_pact_publication_ids_for_consumer_versions, :lp)) .join(:versions,{ Sequel[:lp][:consumer_version_id] => Sequel[:cv][:id]}, { table_alias: :cv }) .join(:latest_tagged_pact_consumer_version_orders, { Sequel[:lp][:consumer_id] => Sequel[:o][:consumer_id], Sequel[:lp][:provider_id] => Sequel[:o][:provider_id], Sequel[:cv][:order] => Sequel[:o][:latest_consumer_version_order] }, { table_alias: :o }) .select(Sequel[:o][:tag_name].as(:name), Sequel[:lp][:pact_publication_id]) end def head_pact_tags_v2_rollback(connection, postgres) if(postgres) head_pact_tags_v1(connection).select_append(Sequel.lit("TIMESTAMP 'epoch'").as(:created_at)) else head_pact_tags_v1(connection) end end def head_pact_tags_v2(connection) connection.from(Sequel.as(:latest_pact_publication_ids_for_consumer_versions, :lp)) .join(:versions,{ Sequel[:lp][:consumer_version_id] => Sequel[:cv][:id]}, { table_alias: :cv }) .join(:latest_tagged_pact_consumer_version_orders, { Sequel[:lp][:consumer_id] => Sequel[:o][:consumer_id], Sequel[:lp][:provider_id] => Sequel[:o][:provider_id], Sequel[:cv][:order] => Sequel[:o][:latest_consumer_version_order] }, { table_alias: :o } ) .join(:tags, { Sequel[:tags][:version_id] => Sequel[:cv][:id], Sequel[:tags][:name] => Sequel[:o][:tag_name] }) .select(Sequel[:o][:tag_name].as(:name), Sequel[:lp][:pact_publication_id], Sequel[:tags][:created_at]) end
Version data entries
53 entries across 53 versions & 1 rubygems