add sort option on query
add example to sort query
support backward code compatibility; add test code
Merge pull request #104 from furushchev/add-sort-query

add sort option on query