Sha256: 2a0bc9668ce9f84a983546c48b45be07554d96ebae4b3d618d6b42b0f86a3e43

Contents?: true

Size: 704 Bytes

Versions: 114

Compression:

Stored size: 704 Bytes

Contents

# frozen_string_literal: true

module Arel # :nodoc: all
  module Nodes
    class Unary < Arel::Nodes::NodeExpression
      attr_accessor :expr
      alias :value :expr

      def initialize(expr)
        super()
        @expr = expr
      end

      def hash
        @expr.hash
      end

      def eql?(other)
        self.class == other.class &&
          self.expr == other.expr
      end
      alias :== :eql?
    end

    %w{
      Bin
      Cube
      DistinctOn
      Group
      GroupingElement
      GroupingSet
      Lateral
      Limit
      Lock
      Not
      Offset
      On
      OptimizerHints
      RollUp
    }.each do |name|
      const_set(name, Class.new(Unary))
    end
  end
end

Version data entries

114 entries across 109 versions & 9 rubygems

Version Path
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/activerecord-6.1.6.1/lib/arel/nodes/unary.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/arel/nodes/unary.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/activerecord-7.0.2.3/lib/arel/nodes/unary.rb
rubypitaya-3.12.5 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/nodes/unary.rb
activerecord-7.0.5 lib/arel/nodes/unary.rb
activerecord-7.0.4.3 lib/arel/nodes/unary.rb
activerecord-6.1.7.3 lib/arel/nodes/unary.rb
rubypitaya-3.12.4 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/nodes/unary.rb
activerecord-6.1.7.2 lib/arel/nodes/unary.rb
activerecord-7.0.4.2 lib/arel/nodes/unary.rb
rubypitaya-3.12.3 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/nodes/unary.rb
activerecord-7.0.4.1 lib/arel/nodes/unary.rb
activerecord-6.1.7.1 lib/arel/nodes/unary.rb
rubypitaya-3.12.2 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/nodes/unary.rb
activerecord-7.0.4 lib/arel/nodes/unary.rb
activerecord-6.1.7 lib/arel/nodes/unary.rb
activerecord-7.0.3.1 lib/arel/nodes/unary.rb
activerecord-6.1.6.1 lib/arel/nodes/unary.rb
activerecord-6.1.6 lib/arel/nodes/unary.rb
activerecord-7.0.3 lib/arel/nodes/unary.rb