SollmoStudio/beyond — pull request #134 by sgkim126 (2014-09-22 08:14:03+00:00)
Title: Add orderBy method to DB API.

This patch orderBy method to Collection. This method return new
collection that returns the sorted result.

For example, `collection.orderBy('fieldName', db.ASC)' will be new
collection that returns the result with sorted by fieldName in ascending
order.

If you want the result sorted by `field1' in ascending and `field2' in
descending, you have to call orderBy twice like
`collection.orderBy('field2', db.DESC).orderBy('field1', db.ASC)'.

If you call orderBy tiwce with the same field, the last one will be
applied. In other words,
`collection.orderBy('fieldName', db.DESC).orderBy('fieldName', db.ASC)'
will retrun the result in ascending.