Sha256: 4f4b8af2005f67330294d8952de5a2664fe7d43d72d9135ac8c7c47c39cec671

Contents?: true

Size: 865 Bytes

Versions: 39

Compression:

Stored size: 865 Bytes

Contents

require "pact_broker/db"
require "pact_broker/repositories/helpers"

module PactBroker
  module Tags
    # The tag associated with the latest verification for a given tag
    # TODO remove this class now we have eager loaders for head_tag
    class TagWithLatestFlag < Sequel::Model(:tags_with_latest_flag)
      associate(:many_to_one, :version, :class => "PactBroker::Domain::Version", :key => :version_id, :primary_key => :id)

      dataset_module do
        include PactBroker::Repositories::Helpers
      end

      def latest?
        !values[:latest].nil?
      end
    end
  end
end

# Table: tags_with_latest_flag
# Columns:
#  name       | text                        |
#  version_id | integer                     |
#  created_at | timestamp without time zone |
#  updated_at | timestamp without time zone |
#  latest     | integer                     |

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
pact_broker-2.107.1 lib/pact_broker/tags/tag_with_latest_flag.rb
pact_broker-2.107.0 lib/pact_broker/tags/tag_with_latest_flag.rb
pact_broker-2.107.0.beta.1 lib/pact_broker/tags/tag_with_latest_flag.rb
pact_broker-2.106.0 lib/pact_broker/tags/tag_with_latest_flag.rb
pact_broker-2.105.0 lib/pact_broker/tags/tag_with_latest_flag.rb
pact_broker-2.104.0 lib/pact_broker/tags/tag_with_latest_flag.rb
pact_broker-2.103.0 lib/pact_broker/tags/tag_with_latest_flag.rb
pact_broker-2.102.2 lib/pact_broker/tags/tag_with_latest_flag.rb
pact_broker-2.102.1 lib/pact_broker/tags/tag_with_latest_flag.rb
pact_broker-2.102.0 lib/pact_broker/tags/tag_with_latest_flag.rb
pact_broker-2.101.0 lib/pact_broker/tags/tag_with_latest_flag.rb
pact_broker-2.100.0 lib/pact_broker/tags/tag_with_latest_flag.rb
pact_broker-2.99.0 lib/pact_broker/tags/tag_with_latest_flag.rb
pact_broker-2.98.0 lib/pact_broker/tags/tag_with_latest_flag.rb
pact_broker-2.97.0 lib/pact_broker/tags/tag_with_latest_flag.rb
pact_broker-2.96.0 lib/pact_broker/tags/tag_with_latest_flag.rb
pact_broker-2.95.1 lib/pact_broker/tags/tag_with_latest_flag.rb
pact_broker-2.95.0 lib/pact_broker/tags/tag_with_latest_flag.rb
pact_broker-2.94.0 lib/pact_broker/tags/tag_with_latest_flag.rb
pact_broker-2.93.4 lib/pact_broker/tags/tag_with_latest_flag.rb