{"action":"created","comment":{"url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/pulls/comments/29179002","id":29179002,"diff_hunk":"@@ -0,0 +1,111 @@\n+-module(sumo_store_riak_ext).\n+\n+-behaviour(sumo_store).\n+\n+-include_lib(\"mixer/include/mixer.hrl\").\n+-mixin([\n+        {sumo_store_riak,\n+         [\n+          init/1,\n+          persist/2,\n+          delete_by/3,\n+          delete_all/2,\n+          find_by/6,\n+          find_all/2,\n+          find_all/5,\n+          create_schema/2\n+         ]\n+        }\n+       ]).\n+\n+-include_lib(\"riakc/include/riakc.hrl\").\n+\n+-export([find_by/3, find_by/5]).\n+\n+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n+%% Types.\n+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n+\n+%% conn: is the Pid of the gen_server that holds the connection with Riak\n+%% bucket: Riak bucket (per store)\n+%% index: Riak index to be used by Riak Search\n+%% read_quorum: Riak read quorum parameters.\n+%% write_quorum: Riak write quorum parameters.\n+%% @see <a href=\"http://docs.basho.com/riak/latest/dev/using/basics\"/>\n+-record(state, {conn     :: sumo_store_riak:connection(),\n+                bucket   :: bucket(),\n+                index    :: sumo_store_riak:index(),\n+                get_opts :: get_options(),\n+                put_opts :: put_options(),\n+                del_opts :: delete_options()}).\n+-type state() :: #state{}.\n+\n+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n+%% External API.\n+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n+\n+-spec find_by(\n+  sumo:schema_name(), sumo:conditions(), state()\n+) -> sumo_store:result([sumo_internal:doc()], state()).\n+find_by(DocName, Conditions, State) ->\n+  find_by(DocName, Conditions, 0, 0, State).\n+\n+-spec find_by(\n+  sumo:schema_name(),\n+  sumo:conditions(),\n+  non_neg_integer(),\n+  non_neg_integer(),\n+  state()\n+) -> sumo_store:result([sumo_internal:doc()], state()).\n+find_by(DocName,","path":"src/sumo_store_riak_ext.erl","position":60,"original_position":60,"commit_id":"86d1698d9ab77b474a91b14d702485ed89b4789a","original_commit_id":"86d1698d9ab77b474a91b14d702485ed89b4789a","user":{"login":"gadgetci","id":10134338,"avatar_url":"https://avatars.githubusercontent.com/u/10134338?v=3","gravatar_id":"","url":"https://api.github.com/users/gadgetci","html_url":"https://github.com/gadgetci","followers_url":"https://api.github.com/users/gadgetci/followers","following_url":"https://api.github.com/users/gadgetci/following{/other_user}","gists_url":"https://api.github.com/users/gadgetci/gists{/gist_id}","starred_url":"https://api.github.com/users/gadgetci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gadgetci/subscriptions","organizations_url":"https://api.github.com/users/gadgetci/orgs","repos_url":"https://api.github.com/users/gadgetci/repos","events_url":"https://api.github.com/users/gadgetci/events{/privacy}","received_events_url":"https://api.github.com/users/gadgetci/received_events","type":"User","site_admin":false},"body":"According to **Xref**:\n> `sumo_store_riak_ext:find_by/5` calls undefined function `sumo_store_riak:fetch_docs/5`","created_at":"2015-04-27T19:01:43Z","updated_at":"2015-04-27T19:01:43Z","html_url":"https://github.com/inaka/sumo_db-riak-extras/pull/3#discussion_r29179002","pull_request_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/inaka/sumo_db-riak-extras/pulls/comments/29179002"},"html":{"href":"https://github.com/inaka/sumo_db-riak-extras/pull/3#discussion_r29179002"},"pull_request":{"href":"https://api.github.com/repos/inaka/sumo_db-riak-extras/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/pulls/3","id":34190581,"html_url":"https://github.com/inaka/sumo_db-riak-extras/pull/3","diff_url":"https://github.com/inaka/sumo_db-riak-extras/pull/3.diff","patch_url":"https://github.com/inaka/sumo_db-riak-extras/pull/3.patch","issue_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/issues/3","number":3,"state":"open","locked":false,"title":"Cabol.first draft","user":{"login":"cabol","id":5407370,"avatar_url":"https://avatars.githubusercontent.com/u/5407370?v=3","gravatar_id":"","url":"https://api.github.com/users/cabol","html_url":"https://github.com/cabol","followers_url":"https://api.github.com/users/cabol/followers","following_url":"https://api.github.com/users/cabol/following{/other_user}","gists_url":"https://api.github.com/users/cabol/gists{/gist_id}","starred_url":"https://api.github.com/users/cabol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cabol/subscriptions","organizations_url":"https://api.github.com/users/cabol/orgs","repos_url":"https://api.github.com/users/cabol/repos","events_url":"https://api.github.com/users/cabol/events{/privacy}","received_events_url":"https://api.github.com/users/cabol/received_events","type":"User","site_admin":false},"body":"Riak Extras 1st draft\r\n- Functions `find_by/3` and `find_by/5` were overwritten to support complex/composed data structures.","created_at":"2015-04-27T17:22:55Z","updated_at":"2015-04-27T19:01:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cc0fa6eaa902eae28fe8e7e71d76aff16cf9405d","assignee":{"login":"igaray","id":167193,"avatar_url":"https://avatars.githubusercontent.com/u/167193?v=3","gravatar_id":"","url":"https://api.github.com/users/igaray","html_url":"https://github.com/igaray","followers_url":"https://api.github.com/users/igaray/followers","following_url":"https://api.github.com/users/igaray/following{/other_user}","gists_url":"https://api.github.com/users/igaray/gists{/gist_id}","starred_url":"https://api.github.com/users/igaray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igaray/subscriptions","organizations_url":"https://api.github.com/users/igaray/orgs","repos_url":"https://api.github.com/users/igaray/repos","events_url":"https://api.github.com/users/igaray/events{/privacy}","received_events_url":"https://api.github.com/users/igaray/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/pulls/3/commits","review_comments_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/pulls/3/comments","review_comment_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/pulls/comments{/number}","comments_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/issues/3/comments","statuses_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/statuses/86d1698d9ab77b474a91b14d702485ed89b4789a","head":{"label":"inaka:cabol.first_draft","ref":"cabol.first_draft","sha":"86d1698d9ab77b474a91b14d702485ed89b4789a","user":{"login":"inaka","id":867053,"avatar_url":"https://avatars.githubusercontent.com/u/867053?v=3","gravatar_id":"","url":"https://api.github.com/users/inaka","html_url":"https://github.com/inaka","followers_url":"https://api.github.com/users/inaka/followers","following_url":"https://api.github.com/users/inaka/following{/other_user}","gists_url":"https://api.github.com/users/inaka/gists{/gist_id}","starred_url":"https://api.github.com/users/inaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inaka/subscriptions","organizations_url":"https://api.github.com/users/inaka/orgs","repos_url":"https://api.github.com/users/inaka/repos","events_url":"https://api.github.com/users/inaka/events{/privacy}","received_events_url":"https://api.github.com/users/inaka/received_events","type":"Organization","site_admin":false},"repo":{"id":34394898,"name":"sumo_db-riak-extras","full_name":"inaka/sumo_db-riak-extras","owner":{"login":"inaka","id":867053,"avatar_url":"https://avatars.githubusercontent.com/u/867053?v=3","gravatar_id":"","url":"https://api.github.com/users/inaka","html_url":"https://github.com/inaka","followers_url":"https://api.github.com/users/inaka/followers","following_url":"https://api.github.com/users/inaka/following{/other_user}","gists_url":"https://api.github.com/users/inaka/gists{/gist_id}","starred_url":"https://api.github.com/users/inaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inaka/subscriptions","organizations_url":"https://api.github.com/users/inaka/orgs","repos_url":"https://api.github.com/users/inaka/repos","events_url":"https://api.github.com/users/inaka/events{/privacy}","received_events_url":"https://api.github.com/users/inaka/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/inaka/sumo_db-riak-extras","description":"Riak-specific functionality for sumo_db","fork":false,"url":"https://api.github.com/repos/inaka/sumo_db-riak-extras","forks_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/forks","keys_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/keys{/key_id}","collaborators_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/teams","hooks_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/hooks","issue_events_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/issues/events{/number}","events_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/events","assignees_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/assignees{/user}","branches_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/branches{/branch}","tags_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/tags","blobs_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/git/refs{/sha}","trees_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/git/trees{/sha}","statuses_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/statuses/{sha}","languages_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/languages","stargazers_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/stargazers","contributors_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/contributors","subscribers_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/subscribers","subscription_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/subscription","commits_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/commits{/sha}","git_commits_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/git/commits{/sha}","comments_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/comments{/number}","issue_comment_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/issues/comments{/number}","contents_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/contents/{+path}","compare_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/compare/{base}...{head}","merges_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/merges","archive_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/downloads","issues_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/issues{/number}","pulls_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/pulls{/number}","milestones_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/milestones{/number}","notifications_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/labels{/name}","releases_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/releases{/id}","created_at":"2015-04-22T14:23:39Z","updated_at":"2015-04-22T14:29:06Z","pushed_at":"2015-04-27T19:00:14Z","git_url":"git://github.com/inaka/sumo_db-riak-extras.git","ssh_url":"git@github.com:inaka/sumo_db-riak-extras.git","clone_url":"https://github.com/inaka/sumo_db-riak-extras.git","svn_url":"https://github.com/inaka/sumo_db-riak-extras","homepage":null,"size":0,"stargazers_count":1,"watchers_count":1,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"inaka:master","ref":"master","sha":"b85dbed975aea209c75ab2ca1d674c62b257c5bb","user":{"login":"inaka","id":867053,"avatar_url":"https://avatars.githubusercontent.com/u/867053?v=3","gravatar_id":"","url":"https://api.github.com/users/inaka","html_url":"https://github.com/inaka","followers_url":"https://api.github.com/users/inaka/followers","following_url":"https://api.github.com/users/inaka/following{/other_user}","gists_url":"https://api.github.com/users/inaka/gists{/gist_id}","starred_url":"https://api.github.com/users/inaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inaka/subscriptions","organizations_url":"https://api.github.com/users/inaka/orgs","repos_url":"https://api.github.com/users/inaka/repos","events_url":"https://api.github.com/users/inaka/events{/privacy}","received_events_url":"https://api.github.com/users/inaka/received_events","type":"Organization","site_admin":false},"repo":{"id":34394898,"name":"sumo_db-riak-extras","full_name":"inaka/sumo_db-riak-extras","owner":{"login":"inaka","id":867053,"avatar_url":"https://avatars.githubusercontent.com/u/867053?v=3","gravatar_id":"","url":"https://api.github.com/users/inaka","html_url":"https://github.com/inaka","followers_url":"https://api.github.com/users/inaka/followers","following_url":"https://api.github.com/users/inaka/following{/other_user}","gists_url":"https://api.github.com/users/inaka/gists{/gist_id}","starred_url":"https://api.github.com/users/inaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inaka/subscriptions","organizations_url":"https://api.github.com/users/inaka/orgs","repos_url":"https://api.github.com/users/inaka/repos","events_url":"https://api.github.com/users/inaka/events{/privacy}","received_events_url":"https://api.github.com/users/inaka/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/inaka/sumo_db-riak-extras","description":"Riak-specific functionality for sumo_db","fork":false,"url":"https://api.github.com/repos/inaka/sumo_db-riak-extras","forks_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/forks","keys_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/keys{/key_id}","collaborators_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/teams","hooks_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/hooks","issue_events_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/issues/events{/number}","events_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/events","assignees_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/assignees{/user}","branches_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/branches{/branch}","tags_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/tags","blobs_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/git/refs{/sha}","trees_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/git/trees{/sha}","statuses_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/statuses/{sha}","languages_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/languages","stargazers_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/stargazers","contributors_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/contributors","subscribers_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/subscribers","subscription_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/subscription","commits_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/commits{/sha}","git_commits_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/git/commits{/sha}","comments_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/comments{/number}","issue_comment_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/issues/comments{/number}","contents_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/contents/{+path}","compare_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/compare/{base}...{head}","merges_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/merges","archive_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/downloads","issues_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/issues{/number}","pulls_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/pulls{/number}","milestones_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/milestones{/number}","notifications_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/labels{/name}","releases_url":"https://api.github.com/repos/inaka/sumo_db-riak-extras/releases{/id}","created_at":"2015-04-22T14:23:39Z","updated_at":"2015-04-22T14:29:06Z","pushed_at":"2015-04-27T19:00:14Z","git_url":"git://github.com/inaka/sumo_db-riak-extras.git","ssh_url":"git@github.com:inaka/sumo_db-riak-extras.git","clone_url":"https://github.com/inaka/sumo_db-riak-extras.git","svn_url":"https://github.com/inaka/sumo_db-riak-extras","homepage":null,"size":0,"stargazers_count":1,"watchers_count":1,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/inaka/sumo_db-riak-extras/pulls/3"},"html":{"href":"https://github.com/inaka/sumo_db-riak-extras/pull/3"},"issue":{"href":"https://api.github.com/repos/inaka/sumo_db-riak-extras/issues/3"},"comments":{"href":"https://api.github.com/repos/inaka/sumo_db-riak-extras/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/inaka/sumo_db-riak-extras/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/inaka/sumo_db-riak-extras/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/inaka/sumo_db-riak-extras/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/inaka/sumo_db-riak-extras/statuses/86d1698d9ab77b474a91b14d702485ed89b4789a"}}}}