{"action":"created","issue":{"url":"https://api.github.com/repos/danielmewes/php-rql/issues/96","labels_url":"https://api.github.com/repos/danielmewes/php-rql/issues/96/labels{/name}","comments_url":"https://api.github.com/repos/danielmewes/php-rql/issues/96/comments","events_url":"https://api.github.com/repos/danielmewes/php-rql/issues/96/events","html_url":"https://github.com/danielmewes/php-rql/issues/96","id":95715287,"number":96,"title":"Question about orderBy","user":{"login":"jamescostian","id":1456118,"avatar_url":"https://avatars.githubusercontent.com/u/1456118?v=3","gravatar_id":"","url":"https://api.github.com/users/jamescostian","html_url":"https://github.com/jamescostian","followers_url":"https://api.github.com/users/jamescostian/followers","following_url":"https://api.github.com/users/jamescostian/following{/other_user}","gists_url":"https://api.github.com/users/jamescostian/gists{/gist_id}","starred_url":"https://api.github.com/users/jamescostian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamescostian/subscriptions","organizations_url":"https://api.github.com/users/jamescostian/orgs","repos_url":"https://api.github.com/users/jamescostian/repos","events_url":"https://api.github.com/users/jamescostian/events{/privacy}","received_events_url":"https://api.github.com/users/jamescostian/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-17T18:27:13Z","updated_at":"2015-07-19T03:59:15Z","closed_at":null,"body":"A query like this returns a cursor:\r\n```php\r\nr\\table( 'someTable' )->filter( array( 'something' => true ) )->run( $conn );\r\n```\r\n\r\nHowever, if you add `orderBy` like so:\r\n```php\r\nr\\table( 'someTable' )->filter( array( 'something' => true ) )->orderBy( 'name' )->run( $conn );\r\n```\r\n\r\nInstead of getting a cursor, you get an array. This can be confusing. If you wrote the first query and then used `->toArray()` on it, but later added an `->orderBy()` then all of a sudden your code wouldn't work - you would need to remove the `->toArray()`.\r\n\r\nWhat I'm wondering is whether or not this behavior is expected, and if so, what is the rationale behind it? I noticed that the same is true for the JS driver, so I'm not sure if this is the place to ask..."},"comment":{"url":"https://api.github.com/repos/danielmewes/php-rql/issues/comments/122620404","html_url":"https://github.com/danielmewes/php-rql/issues/96#issuecomment-122620404","issue_url":"https://api.github.com/repos/danielmewes/php-rql/issues/96","id":122620404,"user":{"login":"danielmewes","id":505365,"avatar_url":"https://avatars.githubusercontent.com/u/505365?v=3","gravatar_id":"","url":"https://api.github.com/users/danielmewes","html_url":"https://github.com/danielmewes","followers_url":"https://api.github.com/users/danielmewes/followers","following_url":"https://api.github.com/users/danielmewes/following{/other_user}","gists_url":"https://api.github.com/users/danielmewes/gists{/gist_id}","starred_url":"https://api.github.com/users/danielmewes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielmewes/subscriptions","organizations_url":"https://api.github.com/users/danielmewes/orgs","repos_url":"https://api.github.com/users/danielmewes/repos","events_url":"https://api.github.com/users/danielmewes/events{/privacy}","received_events_url":"https://api.github.com/users/danielmewes/received_events","type":"User","site_admin":false},"created_at":"2015-07-19T03:59:15Z","updated_at":"2015-07-19T03:59:15Z","body":"Hi @jamescostian, see this answer to a similar question on the main RethinkDB tracker: https://github.com/rethinkdb/rethinkdb/issues/4530#issuecomment-120559659"}}