I started studying both Couchbase and MongoDB to decide wich one to implement on a social network, but the lack of documentation on couchbase side is almost making me give up.
Almost everything I must guess, as documentation are poor, and easier to get confuse between PHP SDK 2.0 and previous versions. There is a lot of documentation but about older sdk versions.
http://docs.couchbase.com/sdk-api/couchbase-php-client-2.0.2/index.html
Now after my outflow, my question.
I have this code, and the necessary view created:
$cb = CouchbaseViewQuery::from('dev_testimonials', 'by_uid')->key($uid)->limit($max)->skip($inicio);
It works as expected, except that I need to order the results by ascending or descending, but I could't find anywhere documentation about that. I thought ->descending(true) should do the trick but doesn't work. Doesn't exist.
All that the API reference says about ordering on CouchbaseViewQuery, is a list of constants:
UPDATE_BEFORE, UPDATE_NONE, UPDATE_AFTER, ORDER_ASCENDING, ORDER_DESCENDING
But there is not explanation about how and where to use them.
Could you help? Thanks.