Sha256: 0259d44ced820612b142f8baa2292779497a85d3909d4054bb052cb6b1ccca3d

Contents?: true

Size: 448 Bytes

Versions: 121

Compression:

Stored size: 448 Bytes

Contents

# frozen_string_literal: true

module Arel # :nodoc: all
  module Nodes
    class Ordering < Unary
      def nulls_first
        NullsFirst.new(self)
      end

      def nulls_last
        NullsLast.new(self)
      end
    end

    class NullsFirst < Ordering
      def reverse
        NullsLast.new(expr.reverse)
      end
    end

    class NullsLast < Ordering
      def reverse
        NullsFirst.new(expr.reverse)
      end
    end
  end
end

Version data entries

121 entries across 116 versions & 11 rubygems

Version Path
activerecord-7.1.3.4 lib/arel/nodes/ordering.rb
activerecord-7.0.8.4 lib/arel/nodes/ordering.rb
activerecord-6.1.7.8 lib/arel/nodes/ordering.rb
activerecord-7.2.0.beta1 lib/arel/nodes/ordering.rb
activerecord-7.1.3.2 lib/arel/nodes/ordering.rb
activerecord-7.1.3.1 lib/arel/nodes/ordering.rb
activerecord-7.0.8.1 lib/arel/nodes/ordering.rb
activerecord-6.1.7.7 lib/arel/nodes/ordering.rb
activerecord-7.1.3 lib/arel/nodes/ordering.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/activerecord-7.0.2.3/lib/arel/nodes/ordering.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/arel/nodes/ordering.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/activerecord-6.1.6.1/lib/arel/nodes/ordering.rb
activerecord-7.1.2 lib/arel/nodes/ordering.rb
activerecord-7.1.1 lib/arel/nodes/ordering.rb
activerecord-7.1.0 lib/arel/nodes/ordering.rb
activerecord-7.1.0.rc2 lib/arel/nodes/ordering.rb
activerecord-7.1.0.rc1 lib/arel/nodes/ordering.rb
activerecord-7.1.0.beta1 lib/arel/nodes/ordering.rb
activerecord-7.0.8 lib/arel/nodes/ordering.rb
activerecord-7.0.7.2 lib/arel/nodes/ordering.rb