You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.
require 'data_mapper'
require 'dm-migrations'
require 'dm-aggregates'
class DmNilTest
include DataMapper::Resource
property :id, Serial
property :test_value, Float
end
DataMapper::Logger.new(STDOUT, :debug)
DataMapper.setup(:default, 'postgres://elmar@localhost/dm_nil')
DataMapper.auto_upgrade!
DataMapper.finalize
DmNilTest.all.destroy
10.times do
DmNilTest.create(test_value: rand)
end
puts DmNilTest.aggregate(:test_value.min, :test_value.max, :test_value.avg).inspect
SQL statement is the same both in Ruby 1.9.3 and 2.0.0:
SELECT MIN("test_value"), MAX("test_value"), AVG("test_value") FROM "dm_nil_tests"
but in the latter case the result is [nil, nil, nil]
The text was updated successfully, but these errors were encountered: