-
-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] upgrade to rom-sql 1.0.0 #370
Conversation
0329275
to
f9601ba
Compare
@jodosha so, that's practically done, just waiting for final releases of rom gems. As you can see changes are tiny. I'm not 100% happy with schema mapping though. I don't have any immediate ideas how to make it work better. From what I've seen hanami entities are supposed to handle coercions both ways, I understand why you did it like that but it's not how rom works, as we have separated input/output coercions in rom 3.0.0. I don't want this to block us though, so let's just stick to what we have now and we can figure it out in hanami-model 2.0.0 (or maybe 1.x). |
Uhm, not sure why travis is failing, tests pass on my machine for all dbs |
@solnic It fails for me locally too. Please remember that when you run DB=sqlite bundle exec rake
# or
DB=mysql bundle exec rake
# or
DB=postgresql bundle exec rake |
@jodosha oh damn :D ok I'll look into that :) |
rom 3.0.0 introduced bi-directional schemas so now we have `input_schema` for commands and an optional `output_schema` for relations
@jodosha tests are failing on postgres because inferrer doesn't support @flash-gordon is it even possible to infer custom-defined types? |
Answering to myself: nope, because custom type has no info about any matching ruby type: [:composite1, {:oid=>6663255, :db_type=>"inventory_item", :default=>"ROW('fuzzy dice'::text, 42, 1.99)", :allow_null=>true, :primary_key=>false, :type=>nil, :ruby_default=>nil}] No idea what to do with that, except having ability to manually specify the attribute in schema |
@solnic I didn't look deep, but I saw |
and ofc it'll require to run more queries to system tables/views to get the info about composite types |
@flash-gordon oh that's interesting, thanks! |
TODO