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
deftry(name)yieldputs"#{name} works"rescue=>eputs"#{name} does not work"putse.messageensureputsendruby_range=Range.new(Time.now,Time.now)rom_range=ROM::SQL::Postgres::Values::Range.new(Time.now,Time.now)sequel_range=Sequel::Postgres::PGRange.new(Time.now,Time.now)custom_range=CustomRange.new(Time.now,Time.now)try(:ruby_range){pg_ranges.changeset(:create,range: ruby_range).commit}try(:sequel_range){pg_ranges.changeset(:create,range: sequel_range).commit}try(:rom_range){pg_ranges.changeset(:create,range: rom_range).commit}try(:custom_range){pg_ranges.changeset(:create,range: custom_range).commit}
Output:
$ bundle exec ruby pg_range.rb
ruby_range does not work
2019-08-15 19:37:25 +0300..2019-08-15 19:37:25 +0300 (Range) has invalid type for :range violates constraints (undefined method `exclude_begin?' for 2019-08-15 19:37:25 +0300..2019-08-15 19:37:25 +0300:Range
Did you mean? exclude_end? failed)
sequel_range does not work
#<Sequel::Postgres::PGRange:0x000055f59c094448 @begin=2019-08-15 19:37:25 +0300, @end=2019-08-15 19:37:25 +0300, @empty=false, @exclude_begin=false, @exclude_end=false, @db_type=nil> (Sequel::Postgres::PGRange) has invalid type for :range violates constraints (undefined method `lower' for #<Sequel::Postgres::PGRange:0x000055f59c094448> failed)
rom_range does not work
"[2019-08-15 19:37:25 +0300,2019-08-15 19:37:25 +0300)" (String) has invalid type for :range violates constraints (undefined method `exclude_begin?' for "[2019-08-15 19:37:25 +0300,2019-08-15 19:37:25 +0300)":String failed)
custom_range does not work
"[2019-08-15 19:37:25 +0300,2019-08-15 19:37:25 +0300]" (String) has invalid type for :range violates constraints (undefined method `exclude_begin?' for "[2019-08-15 19:37:25 +0300,2019-08-15 19:37:25 +0300]":String failed)
This issue may be related to #286 (ruby ranges not working), but with latest rom/dry updates even ROM::SQL::Postgres::Values::Range does not work.
The text was updated successfully, but these errors were encountered:
Creating record in table with pg range column does not work.
Example: https://github.com/cutalion/rom_experiments/blob/fdae88c28d7f5b59ccf9a40de8a4fc0916b9c2c5/pg_range.rb
Output:
This issue may be related to #286 (ruby ranges not working), but with latest rom/dry updates even
ROM::SQL::Postgres::Values::Range
does not work.The text was updated successfully, but these errors were encountered: