spec/adapters/oracle_spec.rb in sequel-2.9.0 vs spec/adapters/oracle_spec.rb in sequel-2.10.0
- old
+ new
@@ -111,28 +111,28 @@
@d.avg(:value).to_i.should == (789+123+456)/3
@d.max(:value).to_i.should == 789
- @d.select(:name, :AVG[:value]).filter(:name => 'abc').group(:name).to_a.should == [
+ @d.select(:name, :AVG.sql_function(:value)).filter(:name => 'abc').group(:name).to_a.should == [
{:name => 'abc', :"avg(value)" => (456+123)/2.0}
]
- @d.select(:AVG[:value]).group(:name).order(:name).limit(1).to_a.should == [
+ @d.select(:AVG.sql_function(:value)).group(:name).order(:name).limit(1).to_a.should == [
{:"avg(value)" => (456+123)/2.0}
]
- @d.select(:name, :AVG[:value]).group(:name).order(:name).to_a.should == [
+ @d.select(:name, :AVG.sql_function(:value)).group(:name).order(:name).to_a.should == [
{:name => 'abc', :"avg(value)" => (456+123)/2.0},
{:name => 'def', :"avg(value)" => 789*1.0}
]
- @d.select(:name, :AVG[:value]).group(:name).order(:name).to_a.should == [
+ @d.select(:name, :AVG.sql_function(:value)).group(:name).order(:name).to_a.should == [
{:name => 'abc', :"avg(value)" => (456+123)/2.0},
{:name => 'def', :"avg(value)" => 789*1.0}
]
- @d.select(:name, :AVG[:value]).group(:name).having(:name => ['abc', 'def']).order(:name).to_a.should == [
+ @d.select(:name, :AVG.sql_function(:value)).group(:name).having(:name => ['abc', 'def']).order(:name).to_a.should == [
{:name => 'abc', :"avg(value)" => (456+123)/2.0},
{:name => 'def', :"avg(value)" => 789*1.0}
]
@d.select(:name, :value).filter(:name => 'abc').union(@d.select(:name, :value).filter(:name => 'def')).order(:value).to_a.should == [