{"action":"created","comment":{"url":"https://api.github.com/repos/facebookincubator/iterlib/pulls/comments/88363146","pull_request_review_id":8939533,"id":88363146,"diff_hunk":"@@ -0,0 +1,234 @@\n+//  Copyright (c) 2012, Facebook, Inc.  All rights reserved.\n+//  This source code is licensed under the BSD-style license found in the\n+//  LICENSE file in the root directory of this source tree. An additional grant\n+//  of patent rights can be found in the PATENTS file in the same directory.\n+//\n+// This file contains an Iterator interface to return simple\n+// query results.\n+//\n+// Query results contain an id, timestamp, optional attributes\n+//\n+// Attributes could be fbobject attributes or structured assoc\n+// attributes as defined by fbschema.\n+//\n+//\n+// Sample usage:\n+// auto it = ConstructIteratorTree()\n+//\n+// Sync version to access the iterator:\n+//\n+// it->prepare().waitVia(folly::EventBaseManager::get()->getEventBase());\n+// while(it->next()) {\n+//   auto& key = it->Key();\n+//   auto& value = it->Value();\n+//   // Do something with key, value\n+// }\n+//\n+// Async version:\n+// it->prepare().then(...);\n+//\n+// It is fine to prepare() iterators from multiple threads as long as each\n+// iterator's prepare() is called once. If an iterator contains multiple\n+// children, it is fine to call each child's prepare() in different threads\n+// given proper synchronization is implemented in parent iter's prepare(). In\n+// a word, don't call prepare() on an iterator multiple times.\n+#pragma once\n+\n+#include <memory>\n+#include <limits>\n+#include <vector>\n+#include <folly/futures/Future.h>\n+\n+#include \"iterlib/Item.h\"\n+\n+namespace iterlib {\n+\n+enum class IteratorType : int32_t {\n+  NONE = 0,\n+  ROCKSDB,\n+  COMPOSITE,\n+  WRAPPED,\n+  LITERAL,\n+  FUTURE,\n+  ORDERBY,\n+  BINARY,\n+};\n+\n+enum class ResultOrder {\n+  DEFAULT = 0, // Index order\n+  INDEX_ORDER = 0,\n+  ID_ORDER,","path":"include/iterlib/Iterator.h","position":60,"original_position":60,"commit_id":"0a24dc6533ad36b329a8077f835b314a36c59c21","original_commit_id":"0a24dc6533ad36b329a8077f835b314a36c59c21","user":{"login":"manukranthk","id":4994270,"avatar_url":"https://avatars.githubusercontent.com/u/4994270?v=3","gravatar_id":"","url":"https://api.github.com/users/manukranthk","html_url":"https://github.com/manukranthk","followers_url":"https://api.github.com/users/manukranthk/followers","following_url":"https://api.github.com/users/manukranthk/following{/other_user}","gists_url":"https://api.github.com/users/manukranthk/gists{/gist_id}","starred_url":"https://api.github.com/users/manukranthk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manukranthk/subscriptions","organizations_url":"https://api.github.com/users/manukranthk/orgs","repos_url":"https://api.github.com/users/manukranthk/repos","events_url":"https://api.github.com/users/manukranthk/events{/privacy}","received_events_url":"https://api.github.com/users/manukranthk/received_events","type":"User","site_admin":false},"body":"We can drop specific order types here. ","created_at":"2016-11-17T00:29:43Z","updated_at":"2016-11-17T00:29:43Z","html_url":"https://github.com/facebookincubator/iterlib/pull/7#discussion_r88363146","pull_request_url":"https://api.github.com/repos/facebookincubator/iterlib/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/facebookincubator/iterlib/pulls/comments/88363146"},"html":{"href":"https://github.com/facebookincubator/iterlib/pull/7#discussion_r88363146"},"pull_request":{"href":"https://api.github.com/repos/facebookincubator/iterlib/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/facebookincubator/iterlib/pulls/7","id":94077400,"html_url":"https://github.com/facebookincubator/iterlib/pull/7","diff_url":"https://github.com/facebookincubator/iterlib/pull/7.diff","patch_url":"https://github.com/facebookincubator/iterlib/pull/7.patch","issue_url":"https://api.github.com/repos/facebookincubator/iterlib/issues/7","number":7,"state":"open","locked":false,"title":"Iterators","user":{"login":"adsharma","id":658691,"avatar_url":"https://avatars.githubusercontent.com/u/658691?v=3","gravatar_id":"","url":"https://api.github.com/users/adsharma","html_url":"https://github.com/adsharma","followers_url":"https://api.github.com/users/adsharma/followers","following_url":"https://api.github.com/users/adsharma/following{/other_user}","gists_url":"https://api.github.com/users/adsharma/gists{/gist_id}","starred_url":"https://api.github.com/users/adsharma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adsharma/subscriptions","organizations_url":"https://api.github.com/users/adsharma/orgs","repos_url":"https://api.github.com/users/adsharma/repos","events_url":"https://api.github.com/users/adsharma/events{/privacy}","received_events_url":"https://api.github.com/users/adsharma/received_events","type":"User","site_admin":false},"body":"Just so that the code lives up to the name of the library.\r\n\r\nWe still need to write up some documentation describing the internals. But at a high level, the iterator iterates over Item -> Item unlike rocksdb::Iterator which is a string -> string map.\r\n\r\nThis pull request contains only the LimitIterator.","created_at":"2016-11-17T00:08:44Z","updated_at":"2016-11-17T00:29:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/facebookincubator/iterlib/pulls/7/commits","review_comments_url":"https://api.github.com/repos/facebookincubator/iterlib/pulls/7/comments","review_comment_url":"https://api.github.com/repos/facebookincubator/iterlib/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebookincubator/iterlib/issues/7/comments","statuses_url":"https://api.github.com/repos/facebookincubator/iterlib/statuses/0a24dc6533ad36b329a8077f835b314a36c59c21","head":{"label":"adsharma:iterators","ref":"iterators","sha":"0a24dc6533ad36b329a8077f835b314a36c59c21","user":{"login":"adsharma","id":658691,"avatar_url":"https://avatars.githubusercontent.com/u/658691?v=3","gravatar_id":"","url":"https://api.github.com/users/adsharma","html_url":"https://github.com/adsharma","followers_url":"https://api.github.com/users/adsharma/followers","following_url":"https://api.github.com/users/adsharma/following{/other_user}","gists_url":"https://api.github.com/users/adsharma/gists{/gist_id}","starred_url":"https://api.github.com/users/adsharma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adsharma/subscriptions","organizations_url":"https://api.github.com/users/adsharma/orgs","repos_url":"https://api.github.com/users/adsharma/repos","events_url":"https://api.github.com/users/adsharma/events{/privacy}","received_events_url":"https://api.github.com/users/adsharma/received_events","type":"User","site_admin":false},"repo":{"id":73520763,"name":"iterlib","full_name":"adsharma/iterlib","owner":{"login":"adsharma","id":658691,"avatar_url":"https://avatars.githubusercontent.com/u/658691?v=3","gravatar_id":"","url":"https://api.github.com/users/adsharma","html_url":"https://github.com/adsharma","followers_url":"https://api.github.com/users/adsharma/followers","following_url":"https://api.github.com/users/adsharma/following{/other_user}","gists_url":"https://api.github.com/users/adsharma/gists{/gist_id}","starred_url":"https://api.github.com/users/adsharma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adsharma/subscriptions","organizations_url":"https://api.github.com/users/adsharma/orgs","repos_url":"https://api.github.com/users/adsharma/repos","events_url":"https://api.github.com/users/adsharma/events{/privacy}","received_events_url":"https://api.github.com/users/adsharma/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/adsharma/iterlib","description":"Iterator library.","fork":true,"url":"https://api.github.com/repos/adsharma/iterlib","forks_url":"https://api.github.com/repos/adsharma/iterlib/forks","keys_url":"https://api.github.com/repos/adsharma/iterlib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adsharma/iterlib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adsharma/iterlib/teams","hooks_url":"https://api.github.com/repos/adsharma/iterlib/hooks","issue_events_url":"https://api.github.com/repos/adsharma/iterlib/issues/events{/number}","events_url":"https://api.github.com/repos/adsharma/iterlib/events","assignees_url":"https://api.github.com/repos/adsharma/iterlib/assignees{/user}","branches_url":"https://api.github.com/repos/adsharma/iterlib/branches{/branch}","tags_url":"https://api.github.com/repos/adsharma/iterlib/tags","blobs_url":"https://api.github.com/repos/adsharma/iterlib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adsharma/iterlib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adsharma/iterlib/git/refs{/sha}","trees_url":"https://api.github.com/repos/adsharma/iterlib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adsharma/iterlib/statuses/{sha}","languages_url":"https://api.github.com/repos/adsharma/iterlib/languages","stargazers_url":"https://api.github.com/repos/adsharma/iterlib/stargazers","contributors_url":"https://api.github.com/repos/adsharma/iterlib/contributors","subscribers_url":"https://api.github.com/repos/adsharma/iterlib/subscribers","subscription_url":"https://api.github.com/repos/adsharma/iterlib/subscription","commits_url":"https://api.github.com/repos/adsharma/iterlib/commits{/sha}","git_commits_url":"https://api.github.com/repos/adsharma/iterlib/git/commits{/sha}","comments_url":"https://api.github.com/repos/adsharma/iterlib/comments{/number}","issue_comment_url":"https://api.github.com/repos/adsharma/iterlib/issues/comments{/number}","contents_url":"https://api.github.com/repos/adsharma/iterlib/contents/{+path}","compare_url":"https://api.github.com/repos/adsharma/iterlib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adsharma/iterlib/merges","archive_url":"https://api.github.com/repos/adsharma/iterlib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adsharma/iterlib/downloads","issues_url":"https://api.github.com/repos/adsharma/iterlib/issues{/number}","pulls_url":"https://api.github.com/repos/adsharma/iterlib/pulls{/number}","milestones_url":"https://api.github.com/repos/adsharma/iterlib/milestones{/number}","notifications_url":"https://api.github.com/repos/adsharma/iterlib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adsharma/iterlib/labels{/name}","releases_url":"https://api.github.com/repos/adsharma/iterlib/releases{/id}","deployments_url":"https://api.github.com/repos/adsharma/iterlib/deployments","created_at":"2016-11-12T00:02:34Z","updated_at":"2016-11-12T00:02:35Z","pushed_at":"2016-11-17T00:00:21Z","git_url":"git://github.com/adsharma/iterlib.git","ssh_url":"git@github.com:adsharma/iterlib.git","clone_url":"https://github.com/adsharma/iterlib.git","svn_url":"https://github.com/adsharma/iterlib","homepage":null,"size":39,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"facebookincubator:master","ref":"master","sha":"8c15da78ded5365e9a57c77809c69e903ae81d62","user":{"login":"facebookincubator","id":19538647,"avatar_url":"https://avatars.githubusercontent.com/u/19538647?v=3","gravatar_id":"","url":"https://api.github.com/users/facebookincubator","html_url":"https://github.com/facebookincubator","followers_url":"https://api.github.com/users/facebookincubator/followers","following_url":"https://api.github.com/users/facebookincubator/following{/other_user}","gists_url":"https://api.github.com/users/facebookincubator/gists{/gist_id}","starred_url":"https://api.github.com/users/facebookincubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebookincubator/subscriptions","organizations_url":"https://api.github.com/users/facebookincubator/orgs","repos_url":"https://api.github.com/users/facebookincubator/repos","events_url":"https://api.github.com/users/facebookincubator/events{/privacy}","received_events_url":"https://api.github.com/users/facebookincubator/received_events","type":"Organization","site_admin":false},"repo":{"id":72038074,"name":"iterlib","full_name":"facebookincubator/iterlib","owner":{"login":"facebookincubator","id":19538647,"avatar_url":"https://avatars.githubusercontent.com/u/19538647?v=3","gravatar_id":"","url":"https://api.github.com/users/facebookincubator","html_url":"https://github.com/facebookincubator","followers_url":"https://api.github.com/users/facebookincubator/followers","following_url":"https://api.github.com/users/facebookincubator/following{/other_user}","gists_url":"https://api.github.com/users/facebookincubator/gists{/gist_id}","starred_url":"https://api.github.com/users/facebookincubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebookincubator/subscriptions","organizations_url":"https://api.github.com/users/facebookincubator/orgs","repos_url":"https://api.github.com/users/facebookincubator/repos","events_url":"https://api.github.com/users/facebookincubator/events{/privacy}","received_events_url":"https://api.github.com/users/facebookincubator/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebookincubator/iterlib","description":"Iterator library.","fork":false,"url":"https://api.github.com/repos/facebookincubator/iterlib","forks_url":"https://api.github.com/repos/facebookincubator/iterlib/forks","keys_url":"https://api.github.com/repos/facebookincubator/iterlib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebookincubator/iterlib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebookincubator/iterlib/teams","hooks_url":"https://api.github.com/repos/facebookincubator/iterlib/hooks","issue_events_url":"https://api.github.com/repos/facebookincubator/iterlib/issues/events{/number}","events_url":"https://api.github.com/repos/facebookincubator/iterlib/events","assignees_url":"https://api.github.com/repos/facebookincubator/iterlib/assignees{/user}","branches_url":"https://api.github.com/repos/facebookincubator/iterlib/branches{/branch}","tags_url":"https://api.github.com/repos/facebookincubator/iterlib/tags","blobs_url":"https://api.github.com/repos/facebookincubator/iterlib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebookincubator/iterlib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebookincubator/iterlib/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebookincubator/iterlib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebookincubator/iterlib/statuses/{sha}","languages_url":"https://api.github.com/repos/facebookincubator/iterlib/languages","stargazers_url":"https://api.github.com/repos/facebookincubator/iterlib/stargazers","contributors_url":"https://api.github.com/repos/facebookincubator/iterlib/contributors","subscribers_url":"https://api.github.com/repos/facebookincubator/iterlib/subscribers","subscription_url":"https://api.github.com/repos/facebookincubator/iterlib/subscription","commits_url":"https://api.github.com/repos/facebookincubator/iterlib/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebookincubator/iterlib/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebookincubator/iterlib/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebookincubator/iterlib/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebookincubator/iterlib/contents/{+path}","compare_url":"https://api.github.com/repos/facebookincubator/iterlib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebookincubator/iterlib/merges","archive_url":"https://api.github.com/repos/facebookincubator/iterlib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebookincubator/iterlib/downloads","issues_url":"https://api.github.com/repos/facebookincubator/iterlib/issues{/number}","pulls_url":"https://api.github.com/repos/facebookincubator/iterlib/pulls{/number}","milestones_url":"https://api.github.com/repos/facebookincubator/iterlib/milestones{/number}","notifications_url":"https://api.github.com/repos/facebookincubator/iterlib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebookincubator/iterlib/labels{/name}","releases_url":"https://api.github.com/repos/facebookincubator/iterlib/releases{/id}","deployments_url":"https://api.github.com/repos/facebookincubator/iterlib/deployments","created_at":"2016-10-26T19:38:25Z","updated_at":"2016-11-16T05:39:01Z","pushed_at":"2016-11-17T00:08:44Z","git_url":"git://github.com/facebookincubator/iterlib.git","ssh_url":"git@github.com:facebookincubator/iterlib.git","clone_url":"https://github.com/facebookincubator/iterlib.git","svn_url":"https://github.com/facebookincubator/iterlib","homepage":null,"size":43,"stargazers_count":12,"watchers_count":12,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebookincubator/iterlib/pulls/7"},"html":{"href":"https://github.com/facebookincubator/iterlib/pull/7"},"issue":{"href":"https://api.github.com/repos/facebookincubator/iterlib/issues/7"},"comments":{"href":"https://api.github.com/repos/facebookincubator/iterlib/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/facebookincubator/iterlib/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/facebookincubator/iterlib/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebookincubator/iterlib/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/facebookincubator/iterlib/statuses/0a24dc6533ad36b329a8077f835b314a36c59c21"}}}}
{"actor":{"display_login":"manukranthk"}}