Sha256: 248bee796984dfd8c0988acd8b25a95567a40b7b732e487b8a0c7fd4a07d67d5

Contents?: true

Size: 497 Bytes

Versions: 53

Compression:

Stored size: 497 Bytes

Contents

module ActiveRecord
  class Relation
    class FromClause # :nodoc:
      attr_reader :value, :name

      def initialize(value, name)
        @value = value
        @name = name
      end

      def binds
        if value.is_a?(Relation)
          value.bound_attributes
        else
          []
        end
      end

      def merge(other)
        self
      end

      def empty?
        value.nil?
      end

      def self.empty
        @empty ||= new(nil, nil)
      end
    end
  end
end

Version data entries

53 entries across 53 versions & 4 rubygems

Version Path
activerecord-5.1.3.rc1 lib/active_record/relation/from_clause.rb
activerecord-5.1.2 lib/active_record/relation/from_clause.rb
activerecord-5.1.2.rc1 lib/active_record/relation/from_clause.rb
activerecord-5.0.4 lib/active_record/relation/from_clause.rb
activerecord-5.0.4.rc1 lib/active_record/relation/from_clause.rb
activerecord-5.1.1 lib/active_record/relation/from_clause.rb
activerecord-5.0.3 lib/active_record/relation/from_clause.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/activerecord-5.0.2/lib/active_record/relation/from_clause.rb
activerecord-5.1.0 lib/active_record/relation/from_clause.rb
activerecord-5.1.0.rc2 lib/active_record/relation/from_clause.rb
activerecord-5.1.0.rc1 lib/active_record/relation/from_clause.rb
activerecord-5.0.2 lib/active_record/relation/from_clause.rb
activerecord-5.0.2.rc1 lib/active_record/relation/from_clause.rb
activerecord-5.1.0.beta1 lib/active_record/relation/from_clause.rb
autocompl-0.2.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/relation/from_clause.rb
autocompl-0.2.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/relation/from_clause.rb
autocompl-0.2.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/relation/from_clause.rb
autocompl-0.1.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/relation/from_clause.rb
autocompl-0.1.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/relation/from_clause.rb
autocompl-0.1.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/relation/from_clause.rb