More tests for sort_query
Added doc block for batch_fetch