Closed syphax-bouazzouni closed 1 year ago
Before this PR, we could do an oder_by for only simple(direct) attributes, now we can do it also for object attributes.
For example
University.where.order_by(address: {country: :asc}).all
Will order universities by country an attribute of the object address.
add complex_order_by unit test(https://github.com/ontoportal-lirmm/goo/commit/778b696c3dc193443b1d2ff08853bcbcd4709d0a)
refactor query_builder to extract internal_variables as instance variable (https://github.com/ontoportal-lirmm/goo/commit/b7a4c56d17587cca1433c65bd74b17451a6475d3)
update order_by to work for joined patterns (object attributes) (https://github.com/ontoportal-lirmm/goo/commit/4df6681401ca332c4a8f91042782787dc0c36b8f)
Issue
Before this PR, we could do an oder_by for only simple(direct) attributes, now we can do it also for object attributes.
For example
Will order universities by country an attribute of the object address.
Changes
add complex_order_by unit test(https://github.com/ontoportal-lirmm/goo/commit/778b696c3dc193443b1d2ff08853bcbcd4709d0a)
refactor query_builder to extract internal_variables as instance variable (https://github.com/ontoportal-lirmm/goo/commit/b7a4c56d17587cca1433c65bd74b17451a6475d3)
update order_by to work for joined patterns (object attributes) (https://github.com/ontoportal-lirmm/goo/commit/4df6681401ca332c4a8f91042782787dc0c36b8f)