Sha256: eeb6fd36cd0c8edff19b9e4c8f65860d4ad5d60dab60e80b75088b1b210a7612

Contents?: true

Size: 673 Bytes

Versions: 39

Compression:

Stored size: 673 Bytes

Contents

module Bmg
  module Sql
    module SelectItem
      include Expr

      def left
        self[1]
      end

      def right
        self[2]
      end

      def qualifier
        left.qualifier
      end

      def would_be_name
        left.would_be_name
      end

      def as_name
        last.as_name
      end

      def is_computed?
        left.is_computed?
      end

      def to_sql(buffer, dialect)
        self[1].to_sql(buffer, dialect)
        unless would_be_name == as_name
          buffer << SPACE << AS << SPACE
          last.to_sql(buffer, dialect)
        end
        buffer
      end

    end # module SelectItem
  end # module Sql
end # module Bmg

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
bmg-0.23.3 lib/bmg/sql/nodes/select_item.rb
bmg-0.23.2 lib/bmg/sql/nodes/select_item.rb
bmg-0.23.1 lib/bmg/sql/nodes/select_item.rb
bmg-0.23.0 lib/bmg/sql/nodes/select_item.rb
bmg-0.21.5 lib/bmg/sql/nodes/select_item.rb
bmg-0.21.4 lib/bmg/sql/nodes/select_item.rb
bmg-0.20.5 lib/bmg/sql/nodes/select_item.rb
bmg-0.19.3 lib/bmg/sql/nodes/select_item.rb
bmg-0.21.3 lib/bmg/sql/nodes/select_item.rb
bmg-0.21.2 lib/bmg/sql/nodes/select_item.rb
bmg-0.21.0 lib/bmg/sql/nodes/select_item.rb
bmg-0.20.4 lib/bmg/sql/nodes/select_item.rb
bmg-0.20.2 lib/bmg/sql/nodes/select_item.rb
bmg-0.20.1 lib/bmg/sql/nodes/select_item.rb
bmg-0.20.0 lib/bmg/sql/nodes/select_item.rb
bmg-0.19.2 lib/bmg/sql/nodes/select_item.rb
bmg-0.19.1 lib/bmg/sql/nodes/select_item.rb
bmg-0.19.0 lib/bmg/sql/nodes/select_item.rb
bmg-0.18.15 lib/bmg/sql/nodes/select_item.rb
bmg-0.18.14 lib/bmg/sql/nodes/select_item.rb