1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Remove deprecated Arel::Expression

This commit is contained in:
Rafael Mendonça França 2014-02-10 18:58:54 -02:00
parent a7d06943dd
commit 7bf868e320
7 changed files with 0 additions and 31 deletions

View file

@ -11,10 +11,6 @@ require 'arel/table'
require 'arel/attributes' require 'arel/attributes'
require 'arel/compatibility/wheres' require 'arel/compatibility/wheres'
#### these are deprecated
require 'arel/expression'
####
require 'arel/visitors' require 'arel/visitors'
require 'arel/tree_manager' require 'arel/tree_manager'

View file

@ -1,5 +0,0 @@
module Arel
module Expression
include Arel::OrderPredications
end
end

View file

@ -1,8 +1,6 @@
module Arel module Arel
module Nodes module Nodes
class Extract < Arel::Nodes::Unary class Extract < Arel::Nodes::Unary
include Arel::Expression
include Arel::Predications include Arel::Predications
attr_accessor :field attr_accessor :field

View file

@ -1,7 +1,6 @@
module Arel module Arel
module Nodes module Nodes
class Function < Arel::Nodes::Node class Function < Arel::Nodes::Node
include Arel::Expression
include Arel::Predications include Arel::Predications
include Arel::WindowPredications include Arel::WindowPredications
attr_accessor :expressions, :alias, :distinct attr_accessor :expressions, :alias, :distinct

View file

@ -1,7 +1,6 @@
module Arel module Arel
module Nodes module Nodes
class Window < Arel::Nodes::Node class Window < Arel::Nodes::Node
include Arel::Expression
attr_accessor :orders, :framing attr_accessor :orders, :framing
def initialize def initialize

View file

@ -1,12 +1,6 @@
require 'helper' require 'helper'
describe Arel::Nodes::Count do describe Arel::Nodes::Count do
describe 'backwards compatibility' do
it 'must be an expression' do
Arel::Nodes::Count.new('foo').must_be_kind_of Arel::Expression
end
end
describe "as" do describe "as" do
it 'should alias the count' do it 'should alias the count' do
table = Arel::Table.new :users table = Arel::Table.new :users

View file

@ -449,18 +449,6 @@ module Arel
SELECT * FROM "users" ORDER BY "users"."id" DESC SELECT * FROM "users" ORDER BY "users"."id" DESC
} }
end end
it 'has order attributes for expressions' do
table = Table.new :users
manager = Arel::SelectManager.new Table.engine
manager.project Nodes::SqlLiteral.new '*'
manager.from table
manager.order table[:id].count.desc
manager.to_sql.must_be_like %{
SELECT * FROM "users" ORDER BY COUNT("users"."id") DESC
}
end
end end
describe 'on' do describe 'on' do