rom-rb / rom

Data mapping and persistence toolkit for Ruby
https://rom-rb.org
MIT License
2.09k stars 161 forks source link

Build optional read types in SchemaDSL #443

Closed flash-gordon closed 7 years ago

flash-gordon commented 7 years ago

rom-sql's inferrer already does it automatically, without it things aren't working smoothly enough, for instance attribute :email, Types::PG::Array(:varchar).optional doesn't get converted from Sequel::PGArray to a plain Array value even the source type Types::PG::Array has a read type inside. Now it's possible not to bother about this nuances, though we might change the DSL/behavior in future (to make it easier/transparent of course).