Sha256: bd49e2abe9b7cb122f24dc69061117c61ac46ef52ea8c623589d0b410dec30e0

Contents?: true

Size: 545 Bytes

Versions: 15

Compression:

Stored size: 545 Bytes

Contents

module Arel
  module Nodes
    class TableAlias < Arel::Nodes::Binary
      alias :name :right
      alias :relation :left
      alias :table_alias :name

      def [] name
        Attribute.new(self, name)
      end

      def table_name
        relation.respond_to?(:name) ? relation.name : name
      end

      def type_cast_for_database(*args)
        relation.type_cast_for_database(*args)
      end

      def able_to_type_cast?
        relation.respond_to?(:able_to_type_cast?) && relation.able_to_type_cast?
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 4 rubygems

Version Path
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/arel-7.1.4/lib/arel/nodes/table_alias.rb
autocompl-0.2.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/arel-7.1.4/lib/arel/nodes/table_alias.rb
autocompl-0.2.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/arel-7.1.4/lib/arel/nodes/table_alias.rb
autocompl-0.2.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/arel-7.1.4/lib/arel/nodes/table_alias.rb
autocompl-0.1.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/arel-7.1.4/lib/arel/nodes/table_alias.rb
autocompl-0.1.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/arel-7.1.4/lib/arel/nodes/table_alias.rb
autocompl-0.1.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/arel-7.1.4/lib/arel/nodes/table_alias.rb
autocompl-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/arel-7.1.4/lib/arel/nodes/table_alias.rb
abaci-0.3.0 vendor/bundle/gems/arel-7.1.0/lib/arel/nodes/table_alias.rb
arel-7.1.4 lib/arel/nodes/table_alias.rb
arel-7.1.3 lib/arel/nodes/table_alias.rb
arel-7.1.2 lib/arel/nodes/table_alias.rb
arel-7.1.1 lib/arel/nodes/table_alias.rb
arel-7.1.0 lib/arel/nodes/table_alias.rb
arel-7.0.0 lib/arel/nodes/table_alias.rb