{"action":"created","issue":{"url":"https://api.github.com/repos/Victopia/php-node/issues/5","labels_url":"https://api.github.com/repos/Victopia/php-node/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/Victopia/php-node/issues/5/comments","events_url":"https://api.github.com/repos/Victopia/php-node/issues/5/events","html_url":"https://github.com/Victopia/php-node/issues/5","id":15029938,"number":5,"title":"Node::get() needs separation between AND and OR filtering.","user":{"login":"vicary","id":85772,"avatar_url":"https://avatars.githubusercontent.com/u/85772?v=3","gravatar_id":"","url":"https://api.github.com/users/vicary","html_url":"https://github.com/vicary","followers_url":"https://api.github.com/users/vicary/followers","following_url":"https://api.github.com/users/vicary/following{/other_user}","gists_url":"https://api.github.com/users/vicary/gists{/gist_id}","starred_url":"https://api.github.com/users/vicary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vicary/subscriptions","organizations_url":"https://api.github.com/users/vicary/orgs","repos_url":"https://api.github.com/users/vicary/repos","events_url":"https://api.github.com/users/vicary/events{/privacy}","received_events_url":"https://api.github.com/users/vicary/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Victopia/php-node/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"vicary","id":85772,"avatar_url":"https://avatars.githubusercontent.com/u/85772?v=3","gravatar_id":"","url":"https://api.github.com/users/vicary","html_url":"https://github.com/vicary","followers_url":"https://api.github.com/users/vicary/followers","following_url":"https://api.github.com/users/vicary/following{/other_user}","gists_url":"https://api.github.com/users/vicary/gists{/gist_id}","starred_url":"https://api.github.com/users/vicary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vicary/subscriptions","organizations_url":"https://api.github.com/users/vicary/orgs","repos_url":"https://api.github.com/users/vicary/repos","events_url":"https://api.github.com/users/vicary/events{/privacy}","received_events_url":"https://api.github.com/users/vicary/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/Victopia/php-node/milestones/1","html_url":"https://github.com/Victopia/php-node/milestones/0.3","labels_url":"https://api.github.com/repos/Victopia/php-node/milestones/1/labels","id":269691,"number":1,"title":"0.3","description":null,"creator":{"login":"vicary","id":85772,"avatar_url":"https://avatars.githubusercontent.com/u/85772?v=3","gravatar_id":"","url":"https://api.github.com/users/vicary","html_url":"https://github.com/vicary","followers_url":"https://api.github.com/users/vicary/followers","following_url":"https://api.github.com/users/vicary/following{/other_user}","gists_url":"https://api.github.com/users/vicary/gists{/gist_id}","starred_url":"https://api.github.com/users/vicary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vicary/subscriptions","organizations_url":"https://api.github.com/users/vicary/orgs","repos_url":"https://api.github.com/users/vicary/repos","events_url":"https://api.github.com/users/vicary/events{/privacy}","received_events_url":"https://api.github.com/users/vicary/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":1,"state":"open","created_at":"2013-02-18T10:57:48Z","updated_at":"2015-05-14T06:25:23Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2013-06-01T17:26:36Z","updated_at":"2015-05-14T06:29:46Z","closed_at":null,"body":"Currently plain values in the filter is basically AND filtered, while arrays are OR filtered, consider the following code:\r\n```PHP\r\nNode::get(array(\r\n  '@collection' => 'foo'\r\n, 'name' => 'pre%'\r\n, 'type' => array('a','b')\r\n));\r\n```\r\n\r\nThis basically selects everything in the `foo` collection, with their `name` field starts with `\"pre\"`, and their `type` field either equals to `\"a\"` OR `\"b\"`.\r\n\r\nThis way is not very clear, needs to better separate between AND and OR.\r\n\r\nThe array OR method will be kept as a shorthand, while the real OR way is giving multiple arrays as the filter.\r\n\r\n```PHP\r\n// The basic OR method will be like this.\r\nNode::get(array(\r\n  array(\r\n    '@collection' => 'foo'\r\n  , 'type' => 'a'\r\n  )\r\n, array(\r\n    '@collection' => 'foo'\r\n  , 'type' => 'b'\r\n  )\r\n));\r\n```"},"comment":{"url":"https://api.github.com/repos/Victopia/php-node/issues/comments/101935139","html_url":"https://github.com/Victopia/php-node/issues/5#issuecomment-101935139","issue_url":"https://api.github.com/repos/Victopia/php-node/issues/5","id":101935139,"user":{"login":"vicary","id":85772,"avatar_url":"https://avatars.githubusercontent.com/u/85772?v=3","gravatar_id":"","url":"https://api.github.com/users/vicary","html_url":"https://github.com/vicary","followers_url":"https://api.github.com/users/vicary/followers","following_url":"https://api.github.com/users/vicary/following{/other_user}","gists_url":"https://api.github.com/users/vicary/gists{/gist_id}","starred_url":"https://api.github.com/users/vicary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vicary/subscriptions","organizations_url":"https://api.github.com/users/vicary/orgs","repos_url":"https://api.github.com/users/vicary/repos","events_url":"https://api.github.com/users/vicary/events{/privacy}","received_events_url":"https://api.github.com/users/vicary/received_events","type":"User","site_admin":false},"created_at":"2015-05-14T06:29:46Z","updated_at":"2015-05-14T06:29:46Z","body":"Logical groups `AND` and `OR` should be made so that it is meaningful in nesting levels, as well as the root level of the specified `$filter` array for `Node::get()`."}}