{"action":"opened","number":5031,"pull_request":{"url":"https://api.github.com/repos/orientechnologies/orientdb/pulls/5031","id":46335524,"html_url":"https://github.com/orientechnologies/orientdb/pull/5031","diff_url":"https://github.com/orientechnologies/orientdb/pull/5031.diff","patch_url":"https://github.com/orientechnologies/orientdb/pull/5031.patch","issue_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/5031","number":5031,"state":"open","locked":false,"title":"View object","user":{"login":"matanshukry","id":5613042,"avatar_url":"https://avatars.githubusercontent.com/u/5613042?v=3","gravatar_id":"","url":"https://api.github.com/users/matanshukry","html_url":"https://github.com/matanshukry","followers_url":"https://api.github.com/users/matanshukry/followers","following_url":"https://api.github.com/users/matanshukry/following{/other_user}","gists_url":"https://api.github.com/users/matanshukry/gists{/gist_id}","starred_url":"https://api.github.com/users/matanshukry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matanshukry/subscriptions","organizations_url":"https://api.github.com/users/matanshukry/orgs","repos_url":"https://api.github.com/users/matanshukry/repos","events_url":"https://api.github.com/users/matanshukry/events{/privacy}","received_events_url":"https://api.github.com/users/matanshukry/received_events","type":"User","site_admin":false},"body":"PR for view object. ( talked about at #4979 )\r\n\r\n### Creating a view\r\n\r\n```\r\nCREATE VIEW <view-name> AS <query>\r\n```\r\n\r\n### Dropping a view\r\n\r\n```\r\nDROP VIEW <view-name>\r\n```\r\n\r\n### Alter a view\r\n \r\n```\r\nALTER VIEW <view-name> [NAME <new-name>] [QUERY <new-query>]\r\n```\r\n   \r\n### Listing all views (console command)\r\n\r\n```\r\nlist views\r\n```\r\n\r\nExample result:\r\n```\r\nVIEWS\r\n-----------------+----------------------------------------------------------------------------------+\r\n NAME            | QUERY                                                                             \r\n-----------------+----------------------------------------------------------------------------------+\r\n userDisplay     | SELECT name, color.append(\" \").append(name) as display_name FROM User            |\r\n-----------------+----------------------------------------------------------------------------------+\r\n TOTAL = 1                                                                                          |\r\n-----------------+----------------------------------------------------------------------------------+\r\n```\r\n   \r\n### Example usage:\r\n```\r\nCREATE CLASS User\r\nINSERT INTO User SET name=\"Mat\", color=\"Blue\"\r\nINSERT INTO User SET name=\"Jason\", color=\"Green\"\r\nINSERT INTO User SET name=\"Samantha\", color=\"Red\"\r\n\r\nCREATE VIEW userDisplay AS SELECT name, color.append(\" \").append(name) as display_name FROM User\r\n\r\nSELECT FROM userDisplay WHERE name in [\"Mat\", \"Samantha\"]\r\n```\r\n\r\nresult:\r\n```\r\n----+------+--------+------------\r\n#   |@CLASS|name    |display_name\r\n----+------+--------+------------\r\n0   |null  |Mat     |Blue Mat    \r\n1   |null  |Samantha|Red Samantha\r\n----+------+--------+------------\r\n```\r\n\r\n### What's left\r\n\r\n1. Some tests for the view; Would be nice if someone else can implement them!\r\n2. Currently there is no check for the query value. That is, you can enter any value you would like in the query, and it will be saved. The error will only show up when actually querying the view. To be honest though I didn't really look at it, due to some time constraints. I'll try to look at it in the next few days.","created_at":"2015-09-29T21:37:37Z","updated_at":"2015-09-29T21:37:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/orientechnologies/orientdb/pulls/5031/commits","review_comments_url":"https://api.github.com/repos/orientechnologies/orientdb/pulls/5031/comments","review_comment_url":"https://api.github.com/repos/orientechnologies/orientdb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/5031/comments","statuses_url":"https://api.github.com/repos/orientechnologies/orientdb/statuses/3de367c97a76b481de946b7c358d7b7301b54441","head":{"label":"matanshukry:featureView","ref":"featureView","sha":"3de367c97a76b481de946b7c358d7b7301b54441","user":{"login":"matanshukry","id":5613042,"avatar_url":"https://avatars.githubusercontent.com/u/5613042?v=3","gravatar_id":"","url":"https://api.github.com/users/matanshukry","html_url":"https://github.com/matanshukry","followers_url":"https://api.github.com/users/matanshukry/followers","following_url":"https://api.github.com/users/matanshukry/following{/other_user}","gists_url":"https://api.github.com/users/matanshukry/gists{/gist_id}","starred_url":"https://api.github.com/users/matanshukry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matanshukry/subscriptions","organizations_url":"https://api.github.com/users/matanshukry/orgs","repos_url":"https://api.github.com/users/matanshukry/repos","events_url":"https://api.github.com/users/matanshukry/events{/privacy}","received_events_url":"https://api.github.com/users/matanshukry/received_events","type":"User","site_admin":false},"repo":{"id":31251181,"name":"orientdb","full_name":"matanshukry/orientdb","owner":{"login":"matanshukry","id":5613042,"avatar_url":"https://avatars.githubusercontent.com/u/5613042?v=3","gravatar_id":"","url":"https://api.github.com/users/matanshukry","html_url":"https://github.com/matanshukry","followers_url":"https://api.github.com/users/matanshukry/followers","following_url":"https://api.github.com/users/matanshukry/following{/other_user}","gists_url":"https://api.github.com/users/matanshukry/gists{/gist_id}","starred_url":"https://api.github.com/users/matanshukry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matanshukry/subscriptions","organizations_url":"https://api.github.com/users/matanshukry/orgs","repos_url":"https://api.github.com/users/matanshukry/repos","events_url":"https://api.github.com/users/matanshukry/events{/privacy}","received_events_url":"https://api.github.com/users/matanshukry/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/matanshukry/orientdb","description":"OrientDB document graph NoSQL dbms (database)","fork":true,"url":"https://api.github.com/repos/matanshukry/orientdb","forks_url":"https://api.github.com/repos/matanshukry/orientdb/forks","keys_url":"https://api.github.com/repos/matanshukry/orientdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matanshukry/orientdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matanshukry/orientdb/teams","hooks_url":"https://api.github.com/repos/matanshukry/orientdb/hooks","issue_events_url":"https://api.github.com/repos/matanshukry/orientdb/issues/events{/number}","events_url":"https://api.github.com/repos/matanshukry/orientdb/events","assignees_url":"https://api.github.com/repos/matanshukry/orientdb/assignees{/user}","branches_url":"https://api.github.com/repos/matanshukry/orientdb/branches{/branch}","tags_url":"https://api.github.com/repos/matanshukry/orientdb/tags","blobs_url":"https://api.github.com/repos/matanshukry/orientdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matanshukry/orientdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matanshukry/orientdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/matanshukry/orientdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matanshukry/orientdb/statuses/{sha}","languages_url":"https://api.github.com/repos/matanshukry/orientdb/languages","stargazers_url":"https://api.github.com/repos/matanshukry/orientdb/stargazers","contributors_url":"https://api.github.com/repos/matanshukry/orientdb/contributors","subscribers_url":"https://api.github.com/repos/matanshukry/orientdb/subscribers","subscription_url":"https://api.github.com/repos/matanshukry/orientdb/subscription","commits_url":"https://api.github.com/repos/matanshukry/orientdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/matanshukry/orientdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/matanshukry/orientdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/matanshukry/orientdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/matanshukry/orientdb/contents/{+path}","compare_url":"https://api.github.com/repos/matanshukry/orientdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matanshukry/orientdb/merges","archive_url":"https://api.github.com/repos/matanshukry/orientdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matanshukry/orientdb/downloads","issues_url":"https://api.github.com/repos/matanshukry/orientdb/issues{/number}","pulls_url":"https://api.github.com/repos/matanshukry/orientdb/pulls{/number}","milestones_url":"https://api.github.com/repos/matanshukry/orientdb/milestones{/number}","notifications_url":"https://api.github.com/repos/matanshukry/orientdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matanshukry/orientdb/labels{/name}","releases_url":"https://api.github.com/repos/matanshukry/orientdb/releases{/id}","created_at":"2015-02-24T08:37:43Z","updated_at":"2015-04-22T09:54:03Z","pushed_at":"2015-09-29T21:35:19Z","git_url":"git://github.com/matanshukry/orientdb.git","ssh_url":"git@github.com:matanshukry/orientdb.git","clone_url":"https://github.com/matanshukry/orientdb.git","svn_url":"https://github.com/matanshukry/orientdb","homepage":"http://www.orientechnologies.com","size":144047,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"orientechnologies:develop","ref":"develop","sha":"4ccdb28096a8c7661223d9f97a4170de1cd3e4a8","user":{"login":"orientechnologies","id":536828,"avatar_url":"https://avatars.githubusercontent.com/u/536828?v=3","gravatar_id":"","url":"https://api.github.com/users/orientechnologies","html_url":"https://github.com/orientechnologies","followers_url":"https://api.github.com/users/orientechnologies/followers","following_url":"https://api.github.com/users/orientechnologies/following{/other_user}","gists_url":"https://api.github.com/users/orientechnologies/gists{/gist_id}","starred_url":"https://api.github.com/users/orientechnologies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orientechnologies/subscriptions","organizations_url":"https://api.github.com/users/orientechnologies/orgs","repos_url":"https://api.github.com/users/orientechnologies/repos","events_url":"https://api.github.com/users/orientechnologies/events{/privacy}","received_events_url":"https://api.github.com/users/orientechnologies/received_events","type":"Organization","site_admin":false},"repo":{"id":7083240,"name":"orientdb","full_name":"orientechnologies/orientdb","owner":{"login":"orientechnologies","id":536828,"avatar_url":"https://avatars.githubusercontent.com/u/536828?v=3","gravatar_id":"","url":"https://api.github.com/users/orientechnologies","html_url":"https://github.com/orientechnologies","followers_url":"https://api.github.com/users/orientechnologies/followers","following_url":"https://api.github.com/users/orientechnologies/following{/other_user}","gists_url":"https://api.github.com/users/orientechnologies/gists{/gist_id}","starred_url":"https://api.github.com/users/orientechnologies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orientechnologies/subscriptions","organizations_url":"https://api.github.com/users/orientechnologies/orgs","repos_url":"https://api.github.com/users/orientechnologies/repos","events_url":"https://api.github.com/users/orientechnologies/events{/privacy}","received_events_url":"https://api.github.com/users/orientechnologies/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/orientechnologies/orientdb","description":"OrientDB is the first Multi-Model DBMS with Document & Graph engine. OrientDB can run distributed (Multi-Master), supports SQL, ACID Transactions, Full-Text indexing, Reactive Queries and has a small memory footprint. OrientDB is licensed with Apache 2 license and the development is driven by Orient Technologies and a wide Open Source community.","fork":false,"url":"https://api.github.com/repos/orientechnologies/orientdb","forks_url":"https://api.github.com/repos/orientechnologies/orientdb/forks","keys_url":"https://api.github.com/repos/orientechnologies/orientdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/orientechnologies/orientdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/orientechnologies/orientdb/teams","hooks_url":"https://api.github.com/repos/orientechnologies/orientdb/hooks","issue_events_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/events{/number}","events_url":"https://api.github.com/repos/orientechnologies/orientdb/events","assignees_url":"https://api.github.com/repos/orientechnologies/orientdb/assignees{/user}","branches_url":"https://api.github.com/repos/orientechnologies/orientdb/branches{/branch}","tags_url":"https://api.github.com/repos/orientechnologies/orientdb/tags","blobs_url":"https://api.github.com/repos/orientechnologies/orientdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/orientechnologies/orientdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/orientechnologies/orientdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/orientechnologies/orientdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/orientechnologies/orientdb/statuses/{sha}","languages_url":"https://api.github.com/repos/orientechnologies/orientdb/languages","stargazers_url":"https://api.github.com/repos/orientechnologies/orientdb/stargazers","contributors_url":"https://api.github.com/repos/orientechnologies/orientdb/contributors","subscribers_url":"https://api.github.com/repos/orientechnologies/orientdb/subscribers","subscription_url":"https://api.github.com/repos/orientechnologies/orientdb/subscription","commits_url":"https://api.github.com/repos/orientechnologies/orientdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/orientechnologies/orientdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/orientechnologies/orientdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/orientechnologies/orientdb/contents/{+path}","compare_url":"https://api.github.com/repos/orientechnologies/orientdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/orientechnologies/orientdb/merges","archive_url":"https://api.github.com/repos/orientechnologies/orientdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/orientechnologies/orientdb/downloads","issues_url":"https://api.github.com/repos/orientechnologies/orientdb/issues{/number}","pulls_url":"https://api.github.com/repos/orientechnologies/orientdb/pulls{/number}","milestones_url":"https://api.github.com/repos/orientechnologies/orientdb/milestones{/number}","notifications_url":"https://api.github.com/repos/orientechnologies/orientdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/labels{/name}","releases_url":"https://api.github.com/repos/orientechnologies/orientdb/releases{/id}","created_at":"2012-12-09T20:33:47Z","updated_at":"2015-09-29T11:48:13Z","pushed_at":"2015-09-29T15:24:31Z","git_url":"git://github.com/orientechnologies/orientdb.git","ssh_url":"git@github.com:orientechnologies/orientdb.git","clone_url":"https://github.com/orientechnologies/orientdb.git","svn_url":"https://github.com/orientechnologies/orientdb","homepage":"http://orientdb.com","size":189504,"stargazers_count":2032,"watchers_count":2032,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":440,"mirror_url":null,"open_issues_count":985,"forks":440,"open_issues":985,"watchers":2032,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/orientechnologies/orientdb/pulls/5031"},"html":{"href":"https://github.com/orientechnologies/orientdb/pull/5031"},"issue":{"href":"https://api.github.com/repos/orientechnologies/orientdb/issues/5031"},"comments":{"href":"https://api.github.com/repos/orientechnologies/orientdb/issues/5031/comments"},"review_comments":{"href":"https://api.github.com/repos/orientechnologies/orientdb/pulls/5031/comments"},"review_comment":{"href":"https://api.github.com/repos/orientechnologies/orientdb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/orientechnologies/orientdb/pulls/5031/commits"},"statuses":{"href":"https://api.github.com/repos/orientechnologies/orientdb/statuses/3de367c97a76b481de946b7c358d7b7301b54441"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":1290,"deletions":143,"changed_files":27}}