diff options
Diffstat (limited to 'lib/arel')
-rw-r--r-- | lib/arel/deprecated.rb | 4 | ||||
-rw-r--r-- | lib/arel/expression.rb | 5 | ||||
-rw-r--r-- | lib/arel/insert_manager.rb | 2 | ||||
-rw-r--r-- | lib/arel/nodes/extract.rb | 2 | ||||
-rw-r--r-- | lib/arel/nodes/function.rb | 1 | ||||
-rw-r--r-- | lib/arel/nodes/window.rb | 1 | ||||
-rw-r--r-- | lib/arel/select_manager.rb | 16 | ||||
-rw-r--r-- | lib/arel/sql/engine.rb | 10 | ||||
-rw-r--r-- | lib/arel/sql_literal.rb | 4 | ||||
-rw-r--r-- | lib/arel/visitors/depth_first.rb | 1 | ||||
-rw-r--r-- | lib/arel/visitors/dot.rb | 1 | ||||
-rw-r--r-- | lib/arel/visitors/to_sql.rb | 1 |
12 files changed, 2 insertions, 46 deletions
diff --git a/lib/arel/deprecated.rb b/lib/arel/deprecated.rb deleted file mode 100644 index 31db11bd2c..0000000000 --- a/lib/arel/deprecated.rb +++ /dev/null @@ -1,4 +0,0 @@ -module Arel - InnerJoin = Nodes::InnerJoin - OuterJoin = Nodes::OuterJoin -end diff --git a/lib/arel/expression.rb b/lib/arel/expression.rb deleted file mode 100644 index 3884d6ede6..0000000000 --- a/lib/arel/expression.rb +++ /dev/null @@ -1,5 +0,0 @@ -module Arel - module Expression - include Arel::OrderPredications - end -end diff --git a/lib/arel/insert_manager.rb b/lib/arel/insert_manager.rb index d6a11b7be0..b5d2aeb3a4 100644 --- a/lib/arel/insert_manager.rb +++ b/lib/arel/insert_manager.rb @@ -17,7 +17,7 @@ module Arel return if fields.empty? if String === fields - @ast.values = SqlLiteral.new(fields) + @ast.values = Nodes::SqlLiteral.new(fields) else @ast.relation ||= fields.first.first.relation diff --git a/lib/arel/nodes/extract.rb b/lib/arel/nodes/extract.rb index 92fbde62e1..64f5c3ff0f 100644 --- a/lib/arel/nodes/extract.rb +++ b/lib/arel/nodes/extract.rb @@ -1,8 +1,6 @@ module Arel module Nodes - class Extract < Arel::Nodes::Unary - include Arel::Expression include Arel::Predications attr_accessor :field diff --git a/lib/arel/nodes/function.rb b/lib/arel/nodes/function.rb index dcafbbf1f4..733a00df46 100644 --- a/lib/arel/nodes/function.rb +++ b/lib/arel/nodes/function.rb @@ -1,7 +1,6 @@ module Arel module Nodes class Function < Arel::Nodes::Node - include Arel::Expression include Arel::Predications include Arel::WindowPredications attr_accessor :expressions, :alias, :distinct diff --git a/lib/arel/nodes/window.rb b/lib/arel/nodes/window.rb index 3c05f47f14..60259e8c05 100644 --- a/lib/arel/nodes/window.rb +++ b/lib/arel/nodes/window.rb @@ -1,7 +1,6 @@ module Arel module Nodes class Window < Arel::Nodes::Node - include Arel::Expression attr_accessor :orders, :framing def initialize diff --git a/lib/arel/select_manager.rb b/lib/arel/select_manager.rb index 5fbe642df0..e3d8792aca 100644 --- a/lib/arel/select_manager.rb +++ b/lib/arel/select_manager.rb @@ -130,7 +130,7 @@ module Arel # FIXME: converting these to SQLLiterals is probably not good, but # rails tests require it. @ctx.projections.concat projections.map { |x| - STRING_OR_SYMBOL_CLASS.include?(x.class) ? SqlLiteral.new(x.to_s) : x + STRING_OR_SYMBOL_CLASS.include?(x.class) ? Nodes::SqlLiteral.new(x.to_s) : x } self end @@ -235,14 +235,6 @@ module Arel @ctx.source end - def joins manager - if $VERBOSE - warn "joins is deprecated and will be removed in 4.0.0" - warn "please remove your call to joins from #{caller.first}" - end - manager.join_sql - end - class Row < Struct.new(:data) # :nodoc: def id data['id'] @@ -255,12 +247,6 @@ module Arel end end - def to_a # :nodoc: - warn "to_a is deprecated. Please remove it from #{caller[0]}" - # FIXME: I think `select` should be made public... - @engine.connection.send(:select, to_sql, 'AREL').map { |x| Row.new(x) } - end - private def collapse exprs, existing = nil exprs = exprs.unshift(existing.expr) if existing diff --git a/lib/arel/sql/engine.rb b/lib/arel/sql/engine.rb deleted file mode 100644 index 8917f5f294..0000000000 --- a/lib/arel/sql/engine.rb +++ /dev/null @@ -1,10 +0,0 @@ -module Arel - module Sql - class Engine - def self.new thing - #warn "#{caller.first} -- Engine will be removed" - thing - end - end - end -end diff --git a/lib/arel/sql_literal.rb b/lib/arel/sql_literal.rb deleted file mode 100644 index 5cb4973117..0000000000 --- a/lib/arel/sql_literal.rb +++ /dev/null @@ -1,4 +0,0 @@ -module Arel - class SqlLiteral < Nodes::SqlLiteral - end -end diff --git a/lib/arel/visitors/depth_first.rb b/lib/arel/visitors/depth_first.rb index 67cdecfa36..18bd81fb9c 100644 --- a/lib/arel/visitors/depth_first.rb +++ b/lib/arel/visitors/depth_first.rb @@ -112,7 +112,6 @@ module Arel alias :visit_Arel_Nodes_SqlLiteral :terminal alias :visit_Arel_Nodes_BindParam :terminal alias :visit_Arel_Nodes_Window :terminal - alias :visit_Arel_SqlLiteral :terminal alias :visit_BigDecimal :terminal alias :visit_Bignum :terminal alias :visit_Class :terminal diff --git a/lib/arel/visitors/dot.rb b/lib/arel/visitors/dot.rb index 82b8c771e4..cb4c2d494c 100644 --- a/lib/arel/visitors/dot.rb +++ b/lib/arel/visitors/dot.rb @@ -193,7 +193,6 @@ module Arel alias :visit_NilClass :visit_String alias :visit_TrueClass :visit_String alias :visit_FalseClass :visit_String - alias :visit_Arel_SqlLiteral :visit_String alias :visit_Arel_Nodes_BindParam :visit_String alias :visit_Fixnum :visit_String alias :visit_BigDecimal :visit_String diff --git a/lib/arel/visitors/to_sql.rb b/lib/arel/visitors/to_sql.rb index 554f98da14..bd0cd8f03c 100644 --- a/lib/arel/visitors/to_sql.rb +++ b/lib/arel/visitors/to_sql.rb @@ -550,7 +550,6 @@ module Arel alias :visit_Arel_Nodes_BindParam :literal alias :visit_Arel_Nodes_SqlLiteral :literal - alias :visit_Arel_SqlLiteral :literal # This is deprecated alias :visit_Bignum :literal alias :visit_Fixnum :literal |