[feedhenry-dev] Using 'sort' with fh.db API

Wojciech Trocki wtrocki at redhat.com
Tue Nov 22 15:10:34 UTC 2016


Thanks for posting that. Sorting works fine in DataBrowser without database
migration.
Additionally we would need to describe limitations of the query api
(impossible to do logical operations etc.)
Adding this info to the ticket.

On Tue, Nov 22, 2016 at 2:55 PM, David Martin <davmarti at redhat.com> wrote:

> Picked this up on slack, but thought others might find it useful (Thanks
> Evan, Philip & Chad)
>
> An example of how to sort fh.db results:
>
>
>     var options = {
>         "act": "list",
>         "type": collectionName,
>         "sort" : {lastName: 1}  // sort JSON results by lastName
> (ascending).  Use -1 for descending
>       };
>
>
> Probably something worth adding to the docs, so i added
> https://issues.jboss.org/browse/FH-2894
>
> Evan mentioned that "this might only work if you've upgraded the db since
> it appears to follow the mongodb syntax/format"
> Has anyone tried it without an 'upgraded' db?
>
> --
> David Martin
> Red Hat Mobile
> Twitter: @irldavem
> IRC: @irldavem (feedhenry, mobile-internal)
>
> _______________________________________________
> feedhenry-dev mailing list
> feedhenry-dev at redhat.com
> https://www.redhat.com/mailman/listinfo/feedhenry-dev
>
>


-- 
Wojciech Trocki
Software Engineer, Red Hat Mobile
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/feedhenry-dev/attachments/20161122/0d7bafdb/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logo.png
Type: image/png
Size: 11472 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/feedhenry-dev/attachments/20161122/0d7bafdb/attachment.png>


More information about the feedhenry-dev mailing list