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
Here is documentation and there is written
// select "users".* from "users" order by "order"."id" desc, "order"."name" asc
{
type: 'select'
, table: 'users'
// Object syntax is the preferable way since it can automatically
// quote your columns and add in the default table
, order: { id: 'desc', name: 'asc' }
, order: ['id desc', 'name asc']
, order: 'id desc'
}
but when I use
order: { id: 'desc', name: 'asc' }
it shows the error that
"{ error: syntax error at or near "order".
Then I tested
orderBy: { id: 'desc', name: 'asc' } and it is working correctly.
The text was updated successfully, but these errors were encountered:
bakhodir10
changed the title
there is issue on the ordering
order in select query
May 3, 2017
https://github.com/goodybag/mongo-sql/blob/master/docs/query-helpers.md#helper-order
Here is documentation and there is written
// select "users".* from "users" order by "order"."id" desc, "order"."name" asc
{
type: 'select'
, table: 'users'
// Object syntax is the preferable way since it can automatically
// quote your columns and add in the default table
, order: { id: 'desc', name: 'asc' }
, order: ['id desc', 'name asc']
, order: 'id desc'
}
but when I use
order: { id: 'desc', name: 'asc' }
it shows the error that
"{ error: syntax error at or near "order".
Then I tested
orderBy: { id: 'desc', name: 'asc' } and it is working correctly.
The text was updated successfully, but these errors were encountered: