{"action":"created","comment":{"url":"https://api.github.com/repos/ankhers/mongodb_ecto/pulls/comments/172632324","pull_request_review_id":101683088,"id":172632324,"diff_hunk":"@@ -0,0 +1,67 @@\n+# Alternative, in ecto_test.exs\n+# Code.require_file \"../../deps/ecto/integration_test/sql/stream.exs\", __DIR__\n+# Code.require_file \"../deps/ecto/integration_test/sql/stream.exs\", __DIR__\n+#  However this assumes everything can be run in a transaction, so it fails\n+#  a precondition of runnability.\n+# So taking as much of the content as is viable and re-wiring it for mongo\n+\n+defmodule Mongo.Ecto.Integration.StreamTest do\n+  use Ecto.Integration.Case\n+\n+  alias Ecto.Integration.TestRepo\n+  alias Ecto.Integration.Post\n+  alias Ecto.Integration.Comment\n+  import Ecto.Query\n+\n+  test \"stream empty\" do\n+    assert [] == TestRepo.stream(Post)\n+      |> Enum.to_list()\n+\n+    assert [] == TestRepo.stream(from p in Post)\n+      |> Enum.to_list()\n+  end\n+\n+  test \"stream without schema\" do\n+    %Post{} = TestRepo.insert!(%Post{title: \"title1\"})\n+    %Post{} = TestRepo.insert!(%Post{title: \"title2\"})\n+\n+    assert [\"title1\", \"title2\"] == TestRepo.stream(from(p in \"posts\", order_by: p.title, select: p.title))\n+      |> Enum.to_list()","path":"test/mongo_ecto/stream_test.exs","position":29,"original_position":29,"commit_id":"5726d4239b9929252b480af15903f158b2675df1","original_commit_id":"5726d4239b9929252b480af15903f158b2675df1","user":{"login":"ebert[bot]","id":23344435,"avatar_url":"https://avatars3.githubusercontent.com/in/597?v=4","gravatar_id":"","url":"https://api.github.com/users/ebert%5Bbot%5D","html_url":"https://github.com/apps/ebert","followers_url":"https://api.github.com/users/ebert%5Bbot%5D/followers","following_url":"https://api.github.com/users/ebert%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/ebert%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/ebert%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebert%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/ebert%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/ebert%5Bbot%5D/repos","events_url":"https://api.github.com/users/ebert%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/ebert%5Bbot%5D/received_events","type":"Bot","site_admin":false},"body":"Use a function call when a pipeline is only one function long","created_at":"2018-03-06T19:28:28Z","updated_at":"2018-03-06T19:28:30Z","html_url":"https://github.com/ankhers/mongodb_ecto/pull/123#discussion_r172632324","pull_request_url":"https://api.github.com/repos/ankhers/mongodb_ecto/pulls/123","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/ankhers/mongodb_ecto/pulls/comments/172632324"},"html":{"href":"https://github.com/ankhers/mongodb_ecto/pull/123#discussion_r172632324"},"pull_request":{"href":"https://api.github.com/repos/ankhers/mongodb_ecto/pulls/123"}}},"pull_request":{"url":"https://api.github.com/repos/ankhers/mongodb_ecto/pulls/123","id":122517250,"html_url":"https://github.com/ankhers/mongodb_ecto/pull/123","diff_url":"https://github.com/ankhers/mongodb_ecto/pull/123.diff","patch_url":"https://github.com/ankhers/mongodb_ecto/pull/123.patch","issue_url":"https://api.github.com/repos/ankhers/mongodb_ecto/issues/123","number":123,"state":"open","locked":false,"title":"[WIP] Ecto 2.1","user":{"login":"ankhers","id":750786,"avatar_url":"https://avatars2.githubusercontent.com/u/750786?v=4","gravatar_id":"","url":"https://api.github.com/users/ankhers","html_url":"https://github.com/ankhers","followers_url":"https://api.github.com/users/ankhers/followers","following_url":"https://api.github.com/users/ankhers/following{/other_user}","gists_url":"https://api.github.com/users/ankhers/gists{/gist_id}","starred_url":"https://api.github.com/users/ankhers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ankhers/subscriptions","organizations_url":"https://api.github.com/users/ankhers/orgs","repos_url":"https://api.github.com/users/ankhers/repos","events_url":"https://api.github.com/users/ankhers/events{/privacy}","received_events_url":"https://api.github.com/users/ankhers/received_events","type":"User","site_admin":false},"body":"**NOTE:** The on conflict feature introduced in Ecto 2.1 is not working at all yet, but this branch should at least be usable. Please leave a note here if you run into any issues while using this branch.\r\n\r\nThe following is a list of tests that this branch will not be fixing, either because it does not make enough sense to within the context of Mongo, or I believe that it is actually an issue with Ecto proper\r\n\r\n* deps/ecto/integration_test/cases/repo.exs\r\n  * 302: unique pseudo-constraint violation error message with join table at the repository -- Mongo does not support joins\r\n  * 637: insert all -- Mongo recognizes `nil`s as the same, preventing the insertion of two empty `Post`s\r\n  * 960: query select take with maps -- This should be an issue with Ecto. It is preventing a string from being made into an atom\r\n  * 1063: load -- This adapter does not support `Ecto.Adapters.SQL.query!/4`\r\n\r\n* deps/ecto/integration_test/cases/type.exs\r\n  * 62: tagged types -- Mongo does not support casting from a query\r\n  * 87: array type -- `where: ^\"b\" in ^[\"a\", \"b\", \"c\"]` does not make sense in the context of mongo","created_at":"2017-05-25T20:19:32Z","updated_at":"2018-03-06T19:28:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ankhers/mongodb_ecto/pulls/123/commits","review_comments_url":"https://api.github.com/repos/ankhers/mongodb_ecto/pulls/123/comments","review_comment_url":"https://api.github.com/repos/ankhers/mongodb_ecto/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ankhers/mongodb_ecto/issues/123/comments","statuses_url":"https://api.github.com/repos/ankhers/mongodb_ecto/statuses/5726d4239b9929252b480af15903f158b2675df1","head":{"label":"ankhers:ecto-2.1","ref":"ecto-2.1","sha":"5726d4239b9929252b480af15903f158b2675df1","user":{"login":"ankhers","id":750786,"avatar_url":"https://avatars2.githubusercontent.com/u/750786?v=4","gravatar_id":"","url":"https://api.github.com/users/ankhers","html_url":"https://github.com/ankhers","followers_url":"https://api.github.com/users/ankhers/followers","following_url":"https://api.github.com/users/ankhers/following{/other_user}","gists_url":"https://api.github.com/users/ankhers/gists{/gist_id}","starred_url":"https://api.github.com/users/ankhers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ankhers/subscriptions","organizations_url":"https://api.github.com/users/ankhers/orgs","repos_url":"https://api.github.com/users/ankhers/repos","events_url":"https://api.github.com/users/ankhers/events{/privacy}","received_events_url":"https://api.github.com/users/ankhers/received_events","type":"User","site_admin":false},"repo":{"id":36249824,"name":"mongodb_ecto","full_name":"ankhers/mongodb_ecto","owner":{"login":"ankhers","id":750786,"avatar_url":"https://avatars2.githubusercontent.com/u/750786?v=4","gravatar_id":"","url":"https://api.github.com/users/ankhers","html_url":"https://github.com/ankhers","followers_url":"https://api.github.com/users/ankhers/followers","following_url":"https://api.github.com/users/ankhers/following{/other_user}","gists_url":"https://api.github.com/users/ankhers/gists{/gist_id}","starred_url":"https://api.github.com/users/ankhers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ankhers/subscriptions","organizations_url":"https://api.github.com/users/ankhers/orgs","repos_url":"https://api.github.com/users/ankhers/repos","events_url":"https://api.github.com/users/ankhers/events{/privacy}","received_events_url":"https://api.github.com/users/ankhers/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ankhers/mongodb_ecto","description":"MongoDB adapter for Ecto","fork":false,"url":"https://api.github.com/repos/ankhers/mongodb_ecto","forks_url":"https://api.github.com/repos/ankhers/mongodb_ecto/forks","keys_url":"https://api.github.com/repos/ankhers/mongodb_ecto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ankhers/mongodb_ecto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ankhers/mongodb_ecto/teams","hooks_url":"https://api.github.com/repos/ankhers/mongodb_ecto/hooks","issue_events_url":"https://api.github.com/repos/ankhers/mongodb_ecto/issues/events{/number}","events_url":"https://api.github.com/repos/ankhers/mongodb_ecto/events","assignees_url":"https://api.github.com/repos/ankhers/mongodb_ecto/assignees{/user}","branches_url":"https://api.github.com/repos/ankhers/mongodb_ecto/branches{/branch}","tags_url":"https://api.github.com/repos/ankhers/mongodb_ecto/tags","blobs_url":"https://api.github.com/repos/ankhers/mongodb_ecto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ankhers/mongodb_ecto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ankhers/mongodb_ecto/git/refs{/sha}","trees_url":"https://api.github.com/repos/ankhers/mongodb_ecto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ankhers/mongodb_ecto/statuses/{sha}","languages_url":"https://api.github.com/repos/ankhers/mongodb_ecto/languages","stargazers_url":"https://api.github.com/repos/ankhers/mongodb_ecto/stargazers","contributors_url":"https://api.github.com/repos/ankhers/mongodb_ecto/contributors","subscribers_url":"https://api.github.com/repos/ankhers/mongodb_ecto/subscribers","subscription_url":"https://api.github.com/repos/ankhers/mongodb_ecto/subscription","commits_url":"https://api.github.com/repos/ankhers/mongodb_ecto/commits{/sha}","git_commits_url":"https://api.github.com/repos/ankhers/mongodb_ecto/git/commits{/sha}","comments_url":"https://api.github.com/repos/ankhers/mongodb_ecto/comments{/number}","issue_comment_url":"https://api.github.com/repos/ankhers/mongodb_ecto/issues/comments{/number}","contents_url":"https://api.github.com/repos/ankhers/mongodb_ecto/contents/{+path}","compare_url":"https://api.github.com/repos/ankhers/mongodb_ecto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ankhers/mongodb_ecto/merges","archive_url":"https://api.github.com/repos/ankhers/mongodb_ecto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ankhers/mongodb_ecto/downloads","issues_url":"https://api.github.com/repos/ankhers/mongodb_ecto/issues{/number}","pulls_url":"https://api.github.com/repos/ankhers/mongodb_ecto/pulls{/number}","milestones_url":"https://api.github.com/repos/ankhers/mongodb_ecto/milestones{/number}","notifications_url":"https://api.github.com/repos/ankhers/mongodb_ecto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ankhers/mongodb_ecto/labels{/name}","releases_url":"https://api.github.com/repos/ankhers/mongodb_ecto/releases{/id}","deployments_url":"https://api.github.com/repos/ankhers/mongodb_ecto/deployments","created_at":"2015-05-25T19:18:02Z","updated_at":"2018-02-23T21:47:44Z","pushed_at":"2018-03-06T19:27:33Z","git_url":"git://github.com/ankhers/mongodb_ecto.git","ssh_url":"git@github.com:ankhers/mongodb_ecto.git","clone_url":"https://github.com/ankhers/mongodb_ecto.git","svn_url":"https://github.com/ankhers/mongodb_ecto","homepage":null,"size":398,"stargazers_count":249,"watchers_count":249,"language":"Elixir","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":85,"mirror_url":null,"archived":false,"open_issues_count":21,"license":null,"forks":85,"open_issues":21,"watchers":249,"default_branch":"master"}},"base":{"label":"ankhers:master","ref":"master","sha":"e7a4fed09d877bf9ae0cb2a47809851470a70aa7","user":{"login":"ankhers","id":750786,"avatar_url":"https://avatars2.githubusercontent.com/u/750786?v=4","gravatar_id":"","url":"https://api.github.com/users/ankhers","html_url":"https://github.com/ankhers","followers_url":"https://api.github.com/users/ankhers/followers","following_url":"https://api.github.com/users/ankhers/following{/other_user}","gists_url":"https://api.github.com/users/ankhers/gists{/gist_id}","starred_url":"https://api.github.com/users/ankhers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ankhers/subscriptions","organizations_url":"https://api.github.com/users/ankhers/orgs","repos_url":"https://api.github.com/users/ankhers/repos","events_url":"https://api.github.com/users/ankhers/events{/privacy}","received_events_url":"https://api.github.com/users/ankhers/received_events","type":"User","site_admin":false},"repo":{"id":36249824,"name":"mongodb_ecto","full_name":"ankhers/mongodb_ecto","owner":{"login":"ankhers","id":750786,"avatar_url":"https://avatars2.githubusercontent.com/u/750786?v=4","gravatar_id":"","url":"https://api.github.com/users/ankhers","html_url":"https://github.com/ankhers","followers_url":"https://api.github.com/users/ankhers/followers","following_url":"https://api.github.com/users/ankhers/following{/other_user}","gists_url":"https://api.github.com/users/ankhers/gists{/gist_id}","starred_url":"https://api.github.com/users/ankhers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ankhers/subscriptions","organizations_url":"https://api.github.com/users/ankhers/orgs","repos_url":"https://api.github.com/users/ankhers/repos","events_url":"https://api.github.com/users/ankhers/events{/privacy}","received_events_url":"https://api.github.com/users/ankhers/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ankhers/mongodb_ecto","description":"MongoDB adapter for Ecto","fork":false,"url":"https://api.github.com/repos/ankhers/mongodb_ecto","forks_url":"https://api.github.com/repos/ankhers/mongodb_ecto/forks","keys_url":"https://api.github.com/repos/ankhers/mongodb_ecto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ankhers/mongodb_ecto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ankhers/mongodb_ecto/teams","hooks_url":"https://api.github.com/repos/ankhers/mongodb_ecto/hooks","issue_events_url":"https://api.github.com/repos/ankhers/mongodb_ecto/issues/events{/number}","events_url":"https://api.github.com/repos/ankhers/mongodb_ecto/events","assignees_url":"https://api.github.com/repos/ankhers/mongodb_ecto/assignees{/user}","branches_url":"https://api.github.com/repos/ankhers/mongodb_ecto/branches{/branch}","tags_url":"https://api.github.com/repos/ankhers/mongodb_ecto/tags","blobs_url":"https://api.github.com/repos/ankhers/mongodb_ecto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ankhers/mongodb_ecto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ankhers/mongodb_ecto/git/refs{/sha}","trees_url":"https://api.github.com/repos/ankhers/mongodb_ecto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ankhers/mongodb_ecto/statuses/{sha}","languages_url":"https://api.github.com/repos/ankhers/mongodb_ecto/languages","stargazers_url":"https://api.github.com/repos/ankhers/mongodb_ecto/stargazers","contributors_url":"https://api.github.com/repos/ankhers/mongodb_ecto/contributors","subscribers_url":"https://api.github.com/repos/ankhers/mongodb_ecto/subscribers","subscription_url":"https://api.github.com/repos/ankhers/mongodb_ecto/subscription","commits_url":"https://api.github.com/repos/ankhers/mongodb_ecto/commits{/sha}","git_commits_url":"https://api.github.com/repos/ankhers/mongodb_ecto/git/commits{/sha}","comments_url":"https://api.github.com/repos/ankhers/mongodb_ecto/comments{/number}","issue_comment_url":"https://api.github.com/repos/ankhers/mongodb_ecto/issues/comments{/number}","contents_url":"https://api.github.com/repos/ankhers/mongodb_ecto/contents/{+path}","compare_url":"https://api.github.com/repos/ankhers/mongodb_ecto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ankhers/mongodb_ecto/merges","archive_url":"https://api.github.com/repos/ankhers/mongodb_ecto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ankhers/mongodb_ecto/downloads","issues_url":"https://api.github.com/repos/ankhers/mongodb_ecto/issues{/number}","pulls_url":"https://api.github.com/repos/ankhers/mongodb_ecto/pulls{/number}","milestones_url":"https://api.github.com/repos/ankhers/mongodb_ecto/milestones{/number}","notifications_url":"https://api.github.com/repos/ankhers/mongodb_ecto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ankhers/mongodb_ecto/labels{/name}","releases_url":"https://api.github.com/repos/ankhers/mongodb_ecto/releases{/id}","deployments_url":"https://api.github.com/repos/ankhers/mongodb_ecto/deployments","created_at":"2015-05-25T19:18:02Z","updated_at":"2018-02-23T21:47:44Z","pushed_at":"2018-03-06T19:27:33Z","git_url":"git://github.com/ankhers/mongodb_ecto.git","ssh_url":"git@github.com:ankhers/mongodb_ecto.git","clone_url":"https://github.com/ankhers/mongodb_ecto.git","svn_url":"https://github.com/ankhers/mongodb_ecto","homepage":null,"size":398,"stargazers_count":249,"watchers_count":249,"language":"Elixir","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":85,"mirror_url":null,"archived":false,"open_issues_count":21,"license":null,"forks":85,"open_issues":21,"watchers":249,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ankhers/mongodb_ecto/pulls/123"},"html":{"href":"https://github.com/ankhers/mongodb_ecto/pull/123"},"issue":{"href":"https://api.github.com/repos/ankhers/mongodb_ecto/issues/123"},"comments":{"href":"https://api.github.com/repos/ankhers/mongodb_ecto/issues/123/comments"},"review_comments":{"href":"https://api.github.com/repos/ankhers/mongodb_ecto/pulls/123/comments"},"review_comment":{"href":"https://api.github.com/repos/ankhers/mongodb_ecto/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ankhers/mongodb_ecto/pulls/123/commits"},"statuses":{"href":"https://api.github.com/repos/ankhers/mongodb_ecto/statuses/5726d4239b9929252b480af15903f158b2675df1"}},"author_association":"OWNER"}}
{"actor":{"display_login":"ebert"}}