The URL generated is
http://localhost:8003/rest/v1/atable?select=%2A&order=%22col1%22.desc.nullslast&order=%22col1%22.desc.nullslast%2C%22col2%22.desc.nullslast
Notice that there are two order parameters - one with col1 and the other with col1 and col2. It seems that the second order is ignored when it is executed. I would guess this depends on the how the server sees the order of the order parameters.
Expected result
The URL generated has just a single order parameter:
http://localhost:8003/rest/v1/atable?select=%2A&order=%22col1%22.desc.nullslast%2C%22col2%22.desc.nullslast
Workaround
Use appendSearchParams('order', 'col1,col2') to generate the order parameter. This produces:
http://localhost:8003/rest/v1/atable?select=%2A&order=col1%2Ccol2
Steps to reproduce
Actual result
The URL generated is
http://localhost:8003/rest/v1/atable?select=%2A&order=%22col1%22.desc.nullslast&order=%22col1%22.desc.nullslast%2C%22col2%22.desc.nullslast
Notice that there are twoorder
parameters - one withcol1
and the other withcol1
andcol2
. It seems that the secondorder
is ignored when it is executed. I would guess this depends on the how the server sees the order of theorder
parameters.Expected result
The URL generated has just a single order parameter:
http://localhost:8003/rest/v1/atable?select=%2A&order=%22col1%22.desc.nullslast%2C%22col2%22.desc.nullslast
Workaround
Use
appendSearchParams('order', 'col1,col2')
to generate theorder
parameter. This produces:http://localhost:8003/rest/v1/atable?select=%2A&order=col1%2Ccol2
I'm using postgrest 0.1.9 (with supabase 0.2.14)