Alexander

Results 20 comments of Alexander

I'm not sure it would make sense for other gateways/adapters (how do call all rom-whatever gems?) What if we qualify schema right before calling it. In the `ROM::SQL::Schema#call` method?

Comment from @flash-gordon: ``` it seems that the pg_range extension doesn't work with ruby's ranges it probably should but ruby doesn't cover all the cases PG has specifically, (...] ranges...

I'm not sure we should check type in Range constructor. ```ruby def self.range(name, read_type) Type(name) do type = SQL::Types.Definition(Values::Range).constructor do |range| format('%s%s,%s%s', range.exclude_begin? ? :'(' : :'[', range.lower, range.upper, range.exclude_end?...

I also figured out that relation returns range fields as `Values::Range` instead of `::Range`. I expected it would return standard ruby range or at least an object with the same...

And...also passing ROM's range to `overlap` doesn't work for some reason. ``` range = som_rel.limit(1).one.range_field where{ |r| r.requests[:when].overlap(range)} ``` > Sequel::Error: can't express # as a SQL literal

So, did this ever work? I just switched from custom range type to ROM::SQL::Postgres::Types::TsTzRange in my project and break everything. I'd like to fix all this, but would you accept...

@v-kolesnikov here's a script to reproduce an issue with query. ```ruby require 'rom' require 'rom-sql' require 'pry' config = ROM::Configuration.new(:sql, 'postgres://localhost/rom_experiments') conn = config.gateways[:default].connection conn.drop_table?(:pg_ranges) conn.create_table(:pg_ranges) do primary_key :id daterange...

@flash-gordon @v-kolesnikov Until fix is ready, I've fixed this in my project by patching core `Range` and `ROM::SQL::Postgres::Values::Range` classes. I'd like to discuss how ranges should be returned from the...

Yes, it makes sense. Sequel does exactly this. Would it be a good idea to also repeat `::Range` interface in `ROM::SQL::Postgres::Values::Range`? (Sequel's PGRange doing this). It seems for me now...

I think we should coerce input value to rom-sql's range, which should implement `sql_literal_append` method. @flash-gordon ?