Sha256: cf0174f56e1d4f90f8d1c961bab35c312c613e6d8d71167daf6bb624311c867e

Contents?: true

Size: 438 Bytes

Versions: 8

Compression:

Stored size: 438 Bytes

Contents

module Arel
  module Nodes

    class Extract < Arel::Nodes::Unary
      include Arel::Expression
      include Arel::Predications

      attr_accessor :field
      attr_accessor :alias

      def initialize expr, field, aliaz = nil
        super(expr)
        @field = field
        @alias = aliaz && SqlLiteral.new(aliaz)
      end

      def as aliaz
        self.alias = SqlLiteral.new(aliaz)
        self
      end
    end
  end
end

Version data entries

8 entries across 3 versions & 3 rubygems

Version Path
mdg-1.0.1 vendor/bundle/ruby/2.3.0/gems/arel-3.0.3/lib/arel/nodes/extract.rb
apl-library-0.0.90 vendor/bundle/ruby/1.8/gems/arel-3.0.3/lib/arel/nodes/extract.rb
apl-library-0.0.90 vendor/bundle/ruby/1.9.1/gems/arel-3.0.3/lib/arel/nodes/extract.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/1.8/gems/arel-3.0.3/lib/arel/nodes/extract.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/2.1.0/gems/arel-3.0.3/lib/arel/nodes/extract.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/arel-3.0.3/lib/arel/nodes/extract.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/1.9.1/gems/arel-3.0.3/lib/arel/nodes/extract.rb
arel-3.0.3 lib/arel/nodes/extract.rb