Build ORDER BY strings in QueryOptions
Created by: dmfay
Right now options.order
is passed through unchanged for all functions making use of QueryOptions. It'd be nice to support building those dynamically from an array of objects eg {field: 'age', direction: 'desc'}
. An optional type
field can supply cast types for document queries (cf #233 (closed) ).
As @ludvigsen suggested in #238 document queries can set an overridable flag in QueryOptions to specify that the fields are in the body rather than the outer table and format the string as (body->>'$field')::$type
appropriately.