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
thank you for writing a library to simplify the syntactic sugar on using Arel nodes to address JSON fields.
There's a problem with your approach though: they don't support operations.
I did not need to do operations on it so I did not see the need. What you see here is a MVP.
Sadly, (for this library) I do not use Rails and Postgres anymore and my days and nights are filled with LogStash code and plugin code, so I am not really able to give this library any attention.
Please provide a PR with tests and I will review and merge it.
Hello,
thank you for writing a library to simplify the syntactic sugar on using Arel nodes to address JSON fields.
There's a problem with your approach though: they don't support operations.
For example you can't do:
This will raise an exception because JsonHashDoubleArrow inherits from Arel::Nodes::Binary but does not include any of the operations, see for example how the InfixOperation is implemented: https://github.com/rails/arel/blob/master/lib/arel/nodes/infix_operation.rb
As you can see here https://github.com/rails/arel/blob/master/lib/arel/nodes/infix_operation.rb#L6 they include all the operations you can do on nodes, but your code just inherits from Binary: https://github.com/guyboertje/arel-pg-json/blob/master/lib/arel/nodes/pg_json.rb
The text was updated successfully, but these errors were encountered: