RFC: order() with foreign tables #292
kiwicopple
started this conversation in
General
Replies: 1 comment 1 reply
-
I'm currently interested in this. As I understand, this would allow me to order by a value of the foreign table. Similar to a query like so, correct?
What I want to achieve is ordering by a value that is part of the foreign table. I tried it like so, but it didn't work (wasn't ordering by the table_2_number)
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently the
order()
function works like this:There is a difference between the filtering on embedded tables (
.gt('prices.unit_amount', 0)
) and ordering of foreign tables (.order('unit_amount', { foreignTable: 'prices' })
)We have an option to convert
order()
to be more inline withfilters
:To do this we will have to
split('.')
on fullstops, and aggregate all of theorder()
functions together.Pending questions:
Beta Was this translation helpful? Give feedback.
All reactions