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:
parent
a7d06943dd
commit
7bf868e320
7 changed files with 0 additions and 31 deletions
|
@ -11,10 +11,6 @@ require 'arel/table'
|
|||
require 'arel/attributes'
|
||||
require 'arel/compatibility/wheres'
|
||||
|
||||
#### these are deprecated
|
||||
require 'arel/expression'
|
||||
####
|
||||
|
||||
require 'arel/visitors'
|
||||
|
||||
require 'arel/tree_manager'
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
module Arel
|
||||
module Expression
|
||||
include Arel::OrderPredications
|
||||
end
|
||||
end
|
|
@ -1,8 +1,6 @@
|
|||
module Arel
|
||||
module Nodes
|
||||
|
||||
class Extract < Arel::Nodes::Unary
|
||||
include Arel::Expression
|
||||
include Arel::Predications
|
||||
|
||||
attr_accessor :field
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
module Arel
|
||||
module Nodes
|
||||
class Window < Arel::Nodes::Node
|
||||
include Arel::Expression
|
||||
attr_accessor :orders, :framing
|
||||
|
||||
def initialize
|
||||
|
|
|
@ -1,12 +1,6 @@
|
|||
require 'helper'
|
||||
|
||||
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
|
||||
it 'should alias the count' do
|
||||
table = Arel::Table.new :users
|
||||
|
|
|
@ -449,18 +449,6 @@ module Arel
|
|||
SELECT * FROM "users" ORDER BY "users"."id" DESC
|
||||
}
|
||||
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
|
||||
|
||||
describe 'on' do
|
||||
|
|
Loading…
Reference in a new issue