{"action":"closed","number":88,"pull_request":{"url":"https://api.github.com/repos/Azure/azure-documentdb-node/pulls/88","id":54896003,"html_url":"https://github.com/Azure/azure-documentdb-node/pull/88","diff_url":"https://github.com/Azure/azure-documentdb-node/pull/88.diff","patch_url":"https://github.com/Azure/azure-documentdb-node/pull/88.patch","issue_url":"https://api.github.com/repos/Azure/azure-documentdb-node/issues/88","number":88,"state":"closed","locked":false,"title":"Added client-side sharding support","user":{"login":"ato9000","id":8519407,"avatar_url":"https://avatars.githubusercontent.com/u/8519407?v=3","gravatar_id":"","url":"https://api.github.com/users/ato9000","html_url":"https://github.com/ato9000","followers_url":"https://api.github.com/users/ato9000/followers","following_url":"https://api.github.com/users/ato9000/following{/other_user}","gists_url":"https://api.github.com/users/ato9000/gists{/gist_id}","starred_url":"https://api.github.com/users/ato9000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ato9000/subscriptions","organizations_url":"https://api.github.com/users/ato9000/orgs","repos_url":"https://api.github.com/users/ato9000/repos","events_url":"https://api.github.com/users/ato9000/events{/privacy}","received_events_url":"https://api.github.com/users/ato9000/received_events","type":"User","site_admin":false},"body":"Added client-side sharding support\r\n\r\nA new property called \"partitionResolvers\" is being added to the DocumentClient class. It will store a dictionary of partition resolvers, using the provided links as the keys.\r\n\r\nA partition resolver is expected to implement the following methods:\r\n- getPartitionKey(document: object): object\r\n- resolveForCreate(partitionKey: object): string\r\n- resolveForRead(partitionKey: object): string[]\r\n\r\nThe following operations will use a partition resolver if one is found for the provided key.\r\n- createDcoument: \r\n    - using the partition resolver, it will get the partition key for the given document,\r\n    - resolve the collection link from the partition key, \r\n    - use the resolved collection link to create the document\r\n\r\n- upsertDocument\r\n    - using the partition resolver, it will get the partition key for the given document,\r\n    - resolve the collection link from the partition key, \r\n    - use the resolved collection link to upsert the document\r\n\r\n- queryDocuments: \r\n    - it will get the partition key from the given options argument\r\n    - resolve the set of collection links from the partition key, \r\n    - use the resolved collection links to query documents\r\n\r\nFor queries, the QueryIterator will iterate through all the resolved collection links to obtain the resulting documents.\r\n\r\nAlso adding tow implementations of partition resolvers: RangePartitionResolver and HashPartitionResolver","created_at":"2016-01-01T20:26:24Z","updated_at":"2016-01-01T20:40:36Z","closed_at":"2016-01-01T20:40:36Z","merged_at":"2016-01-01T20:40:36Z","merge_commit_sha":"7703ef877ec8038597f7b43147a69a7466dd9a58","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Azure/azure-documentdb-node/pulls/88/commits","review_comments_url":"https://api.github.com/repos/Azure/azure-documentdb-node/pulls/88/comments","review_comment_url":"https://api.github.com/repos/Azure/azure-documentdb-node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/azure-documentdb-node/issues/88/comments","statuses_url":"https://api.github.com/repos/Azure/azure-documentdb-node/statuses/ba29683c7a2a14cac7a7b0157a3785c467fcc98d","head":{"label":"ato9000:master","ref":"master","sha":"ba29683c7a2a14cac7a7b0157a3785c467fcc98d","user":{"login":"ato9000","id":8519407,"avatar_url":"https://avatars.githubusercontent.com/u/8519407?v=3","gravatar_id":"","url":"https://api.github.com/users/ato9000","html_url":"https://github.com/ato9000","followers_url":"https://api.github.com/users/ato9000/followers","following_url":"https://api.github.com/users/ato9000/following{/other_user}","gists_url":"https://api.github.com/users/ato9000/gists{/gist_id}","starred_url":"https://api.github.com/users/ato9000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ato9000/subscriptions","organizations_url":"https://api.github.com/users/ato9000/orgs","repos_url":"https://api.github.com/users/ato9000/repos","events_url":"https://api.github.com/users/ato9000/events{/privacy}","received_events_url":"https://api.github.com/users/ato9000/received_events","type":"User","site_admin":false},"repo":{"id":42546934,"name":"azure-documentdb-node","full_name":"ato9000/azure-documentdb-node","owner":{"login":"ato9000","id":8519407,"avatar_url":"https://avatars.githubusercontent.com/u/8519407?v=3","gravatar_id":"","url":"https://api.github.com/users/ato9000","html_url":"https://github.com/ato9000","followers_url":"https://api.github.com/users/ato9000/followers","following_url":"https://api.github.com/users/ato9000/following{/other_user}","gists_url":"https://api.github.com/users/ato9000/gists{/gist_id}","starred_url":"https://api.github.com/users/ato9000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ato9000/subscriptions","organizations_url":"https://api.github.com/users/ato9000/orgs","repos_url":"https://api.github.com/users/ato9000/repos","events_url":"https://api.github.com/users/ato9000/events{/privacy}","received_events_url":"https://api.github.com/users/ato9000/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ato9000/azure-documentdb-node","description":"","fork":true,"url":"https://api.github.com/repos/ato9000/azure-documentdb-node","forks_url":"https://api.github.com/repos/ato9000/azure-documentdb-node/forks","keys_url":"https://api.github.com/repos/ato9000/azure-documentdb-node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ato9000/azure-documentdb-node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ato9000/azure-documentdb-node/teams","hooks_url":"https://api.github.com/repos/ato9000/azure-documentdb-node/hooks","issue_events_url":"https://api.github.com/repos/ato9000/azure-documentdb-node/issues/events{/number}","events_url":"https://api.github.com/repos/ato9000/azure-documentdb-node/events","assignees_url":"https://api.github.com/repos/ato9000/azure-documentdb-node/assignees{/user}","branches_url":"https://api.github.com/repos/ato9000/azure-documentdb-node/branches{/branch}","tags_url":"https://api.github.com/repos/ato9000/azure-documentdb-node/tags","blobs_url":"https://api.github.com/repos/ato9000/azure-documentdb-node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ato9000/azure-documentdb-node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ato9000/azure-documentdb-node/git/refs{/sha}","trees_url":"https://api.github.com/repos/ato9000/azure-documentdb-node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ato9000/azure-documentdb-node/statuses/{sha}","languages_url":"https://api.github.com/repos/ato9000/azure-documentdb-node/languages","stargazers_url":"https://api.github.com/repos/ato9000/azure-documentdb-node/stargazers","contributors_url":"https://api.github.com/repos/ato9000/azure-documentdb-node/contributors","subscribers_url":"https://api.github.com/repos/ato9000/azure-documentdb-node/subscribers","subscription_url":"https://api.github.com/repos/ato9000/azure-documentdb-node/subscription","commits_url":"https://api.github.com/repos/ato9000/azure-documentdb-node/commits{/sha}","git_commits_url":"https://api.github.com/repos/ato9000/azure-documentdb-node/git/commits{/sha}","comments_url":"https://api.github.com/repos/ato9000/azure-documentdb-node/comments{/number}","issue_comment_url":"https://api.github.com/repos/ato9000/azure-documentdb-node/issues/comments{/number}","contents_url":"https://api.github.com/repos/ato9000/azure-documentdb-node/contents/{+path}","compare_url":"https://api.github.com/repos/ato9000/azure-documentdb-node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ato9000/azure-documentdb-node/merges","archive_url":"https://api.github.com/repos/ato9000/azure-documentdb-node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ato9000/azure-documentdb-node/downloads","issues_url":"https://api.github.com/repos/ato9000/azure-documentdb-node/issues{/number}","pulls_url":"https://api.github.com/repos/ato9000/azure-documentdb-node/pulls{/number}","milestones_url":"https://api.github.com/repos/ato9000/azure-documentdb-node/milestones{/number}","notifications_url":"https://api.github.com/repos/ato9000/azure-documentdb-node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ato9000/azure-documentdb-node/labels{/name}","releases_url":"https://api.github.com/repos/ato9000/azure-documentdb-node/releases{/id}","created_at":"2015-09-15T21:13:19Z","updated_at":"2015-09-15T21:13:19Z","pushed_at":"2016-01-01T20:21:11Z","git_url":"git://github.com/ato9000/azure-documentdb-node.git","ssh_url":"git@github.com:ato9000/azure-documentdb-node.git","clone_url":"https://github.com/ato9000/azure-documentdb-node.git","svn_url":"https://github.com/ato9000/azure-documentdb-node","homepage":null,"size":8695,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"Azure:master","ref":"master","sha":"ef53e5f6707a5dc45920fb6ad54d9c7e008a6c18","user":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":22739262,"name":"azure-documentdb-node","full_name":"Azure/azure-documentdb-node","owner":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/azure-documentdb-node","description":"","fork":false,"url":"https://api.github.com/repos/Azure/azure-documentdb-node","forks_url":"https://api.github.com/repos/Azure/azure-documentdb-node/forks","keys_url":"https://api.github.com/repos/Azure/azure-documentdb-node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/azure-documentdb-node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/azure-documentdb-node/teams","hooks_url":"https://api.github.com/repos/Azure/azure-documentdb-node/hooks","issue_events_url":"https://api.github.com/repos/Azure/azure-documentdb-node/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/azure-documentdb-node/events","assignees_url":"https://api.github.com/repos/Azure/azure-documentdb-node/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/azure-documentdb-node/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/azure-documentdb-node/tags","blobs_url":"https://api.github.com/repos/Azure/azure-documentdb-node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/azure-documentdb-node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/azure-documentdb-node/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/azure-documentdb-node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/azure-documentdb-node/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/azure-documentdb-node/languages","stargazers_url":"https://api.github.com/repos/Azure/azure-documentdb-node/stargazers","contributors_url":"https://api.github.com/repos/Azure/azure-documentdb-node/contributors","subscribers_url":"https://api.github.com/repos/Azure/azure-documentdb-node/subscribers","subscription_url":"https://api.github.com/repos/Azure/azure-documentdb-node/subscription","commits_url":"https://api.github.com/repos/Azure/azure-documentdb-node/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/azure-documentdb-node/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/azure-documentdb-node/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/azure-documentdb-node/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/azure-documentdb-node/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/azure-documentdb-node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/azure-documentdb-node/merges","archive_url":"https://api.github.com/repos/Azure/azure-documentdb-node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/azure-documentdb-node/downloads","issues_url":"https://api.github.com/repos/Azure/azure-documentdb-node/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/azure-documentdb-node/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/azure-documentdb-node/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/azure-documentdb-node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/azure-documentdb-node/labels{/name}","releases_url":"https://api.github.com/repos/Azure/azure-documentdb-node/releases{/id}","created_at":"2014-08-07T23:05:48Z","updated_at":"2015-12-27T04:31:05Z","pushed_at":"2016-01-01T20:40:36Z","git_url":"git://github.com/Azure/azure-documentdb-node.git","ssh_url":"git@github.com:Azure/azure-documentdb-node.git","clone_url":"https://github.com/Azure/azure-documentdb-node.git","svn_url":"https://github.com/Azure/azure-documentdb-node","homepage":null,"size":8604,"stargazers_count":46,"watchers_count":46,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":47,"mirror_url":null,"open_issues_count":7,"forks":47,"open_issues":7,"watchers":46,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-documentdb-node/pulls/88"},"html":{"href":"https://github.com/Azure/azure-documentdb-node/pull/88"},"issue":{"href":"https://api.github.com/repos/Azure/azure-documentdb-node/issues/88"},"comments":{"href":"https://api.github.com/repos/Azure/azure-documentdb-node/issues/88/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/azure-documentdb-node/pulls/88/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/azure-documentdb-node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/azure-documentdb-node/pulls/88/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/azure-documentdb-node/statuses/ba29683c7a2a14cac7a7b0157a3785c467fcc98d"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"ryancrawcour","id":1082796,"avatar_url":"https://avatars.githubusercontent.com/u/1082796?v=3","gravatar_id":"","url":"https://api.github.com/users/ryancrawcour","html_url":"https://github.com/ryancrawcour","followers_url":"https://api.github.com/users/ryancrawcour/followers","following_url":"https://api.github.com/users/ryancrawcour/following{/other_user}","gists_url":"https://api.github.com/users/ryancrawcour/gists{/gist_id}","starred_url":"https://api.github.com/users/ryancrawcour/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryancrawcour/subscriptions","organizations_url":"https://api.github.com/users/ryancrawcour/orgs","repos_url":"https://api.github.com/users/ryancrawcour/repos","events_url":"https://api.github.com/users/ryancrawcour/events{/privacy}","received_events_url":"https://api.github.com/users/ryancrawcour/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":32,"additions":2866,"deletions":123,"changed_files":25}}