{"action":"created","comment":{"url":"https://api.github.com/repos/foursquare/rogue/pulls/comments/36988384","id":36988384,"diff_hunk":"@@ -0,0 +1,77 @@\n+// Copyright 2015 Foursquare Labs Inc. All Rights Reserved.\n+\n+package com.foursquare.rogue.spindle\n+\n+import com.foursquare.spindle.{UntypedMetaRecord, UntypedRecord}\n+import com.mongodb.{BasicDBObject, DBCursor, DBCallback, DBCollection, DBDecoder, DBDecoderFactory, DBObject}\n+import java.io.InputStream\n+import org.bson.{BasicBSONDecoder, BSONCallback, BSONObject}\n+\n+case class SpindleDBDecoderFactory(\n+  meta: UntypedMetaRecord,\n+  recordReader: (UntypedMetaRecord, InputStream) => SpindleDBObject\n+) extends DBDecoderFactory {\n+  def create(): DBDecoder = new SpindleDBDecoder(meta, recordReader)\n+}\n+\n+case class SpindleDBDecoder(\n+  meta: UntypedMetaRecord,\n+  recordReader: (UntypedMetaRecord, InputStream) => SpindleDBObject\n+) extends DBDecoder {\n+  def decode(is: InputStream, collection: DBCollection): DBObject = {\n+    recordReader(meta, is)\n+  }\n+\n+  def getDBCallback(collection: DBCollection): DBCallback = {\n+    throw new UnsupportedOperationException()","path":"rogue-spindle/src/main/scala/com/foursquare/rogue/spindle/SpindleDBDecoderFactory.scala","position":26,"original_position":26,"commit_id":"73d2323ac88f7dd97e587df5bf7ff0d7e86afacb","original_commit_id":"73d2323ac88f7dd97e587df5bf7ff0d7e86afacb","user":{"login":"paperstreet","id":52528,"avatar_url":"https://avatars.githubusercontent.com/u/52528?v=3","gravatar_id":"","url":"https://api.github.com/users/paperstreet","html_url":"https://github.com/paperstreet","followers_url":"https://api.github.com/users/paperstreet/followers","following_url":"https://api.github.com/users/paperstreet/following{/other_user}","gists_url":"https://api.github.com/users/paperstreet/gists{/gist_id}","starred_url":"https://api.github.com/users/paperstreet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paperstreet/subscriptions","organizations_url":"https://api.github.com/users/paperstreet/orgs","repos_url":"https://api.github.com/users/paperstreet/repos","events_url":"https://api.github.com/users/paperstreet/events{/privacy}","received_events_url":"https://api.github.com/users/paperstreet/received_events","type":"User","site_admin":false},"body":"do you know what all these are used for? why don't we need them?","created_at":"2015-08-13T15:33:45Z","updated_at":"2015-08-13T15:33:45Z","html_url":"https://github.com/foursquare/rogue/pull/114#discussion_r36988384","pull_request_url":"https://api.github.com/repos/foursquare/rogue/pulls/114","_links":{"self":{"href":"https://api.github.com/repos/foursquare/rogue/pulls/comments/36988384"},"html":{"href":"https://github.com/foursquare/rogue/pull/114#discussion_r36988384"},"pull_request":{"href":"https://api.github.com/repos/foursquare/rogue/pulls/114"}}},"pull_request":{"url":"https://api.github.com/repos/foursquare/rogue/pulls/114","id":41618676,"html_url":"https://github.com/foursquare/rogue/pull/114","diff_url":"https://github.com/foursquare/rogue/pull/114.diff","patch_url":"https://github.com/foursquare/rogue/pull/114.patch","issue_url":"https://api.github.com/repos/foursquare/rogue/issues/114","number":114,"state":"open","locked":false,"title":"SpindleDatabaseService has overridable serializer","user":{"login":"hoffrocket","id":24408,"avatar_url":"https://avatars.githubusercontent.com/u/24408?v=3","gravatar_id":"","url":"https://api.github.com/users/hoffrocket","html_url":"https://github.com/hoffrocket","followers_url":"https://api.github.com/users/hoffrocket/followers","following_url":"https://api.github.com/users/hoffrocket/following{/other_user}","gists_url":"https://api.github.com/users/hoffrocket/gists{/gist_id}","starred_url":"https://api.github.com/users/hoffrocket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoffrocket/subscriptions","organizations_url":"https://api.github.com/users/hoffrocket/orgs","repos_url":"https://api.github.com/users/hoffrocket/repos","events_url":"https://api.github.com/users/hoffrocket/events{/privacy}","received_events_url":"https://api.github.com/users/hoffrocket/received_events","type":"User","site_admin":false},"body":"Allow subclasses to use a different InputStream -> UntypedRecord\r\n\r\nThis change also reuses the TBSONObjectProtocol for each document in a\r\nDBCursor.","created_at":"2015-08-04T21:17:57Z","updated_at":"2015-08-13T15:33:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"452403cae76df16aeedbbf382d234aa4adbc6e02","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/foursquare/rogue/pulls/114/commits","review_comments_url":"https://api.github.com/repos/foursquare/rogue/pulls/114/comments","review_comment_url":"https://api.github.com/repos/foursquare/rogue/pulls/comments{/number}","comments_url":"https://api.github.com/repos/foursquare/rogue/issues/114/comments","statuses_url":"https://api.github.com/repos/foursquare/rogue/statuses/73d2323ac88f7dd97e587df5bf7ff0d7e86afacb","head":{"label":"foursquare:jon-bson","ref":"jon-bson","sha":"73d2323ac88f7dd97e587df5bf7ff0d7e86afacb","user":{"login":"foursquare","id":72779,"avatar_url":"https://avatars.githubusercontent.com/u/72779?v=3","gravatar_id":"","url":"https://api.github.com/users/foursquare","html_url":"https://github.com/foursquare","followers_url":"https://api.github.com/users/foursquare/followers","following_url":"https://api.github.com/users/foursquare/following{/other_user}","gists_url":"https://api.github.com/users/foursquare/gists{/gist_id}","starred_url":"https://api.github.com/users/foursquare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foursquare/subscriptions","organizations_url":"https://api.github.com/users/foursquare/orgs","repos_url":"https://api.github.com/users/foursquare/repos","events_url":"https://api.github.com/users/foursquare/events{/privacy}","received_events_url":"https://api.github.com/users/foursquare/received_events","type":"Organization","site_admin":false},"repo":{"id":1259508,"name":"rogue","full_name":"foursquare/rogue","owner":{"login":"foursquare","id":72779,"avatar_url":"https://avatars.githubusercontent.com/u/72779?v=3","gravatar_id":"","url":"https://api.github.com/users/foursquare","html_url":"https://github.com/foursquare","followers_url":"https://api.github.com/users/foursquare/followers","following_url":"https://api.github.com/users/foursquare/following{/other_user}","gists_url":"https://api.github.com/users/foursquare/gists{/gist_id}","starred_url":"https://api.github.com/users/foursquare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foursquare/subscriptions","organizations_url":"https://api.github.com/users/foursquare/orgs","repos_url":"https://api.github.com/users/foursquare/repos","events_url":"https://api.github.com/users/foursquare/events{/privacy}","received_events_url":"https://api.github.com/users/foursquare/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/foursquare/rogue","description":"A Scala DSL for MongoDB","fork":false,"url":"https://api.github.com/repos/foursquare/rogue","forks_url":"https://api.github.com/repos/foursquare/rogue/forks","keys_url":"https://api.github.com/repos/foursquare/rogue/keys{/key_id}","collaborators_url":"https://api.github.com/repos/foursquare/rogue/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/foursquare/rogue/teams","hooks_url":"https://api.github.com/repos/foursquare/rogue/hooks","issue_events_url":"https://api.github.com/repos/foursquare/rogue/issues/events{/number}","events_url":"https://api.github.com/repos/foursquare/rogue/events","assignees_url":"https://api.github.com/repos/foursquare/rogue/assignees{/user}","branches_url":"https://api.github.com/repos/foursquare/rogue/branches{/branch}","tags_url":"https://api.github.com/repos/foursquare/rogue/tags","blobs_url":"https://api.github.com/repos/foursquare/rogue/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/foursquare/rogue/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/foursquare/rogue/git/refs{/sha}","trees_url":"https://api.github.com/repos/foursquare/rogue/git/trees{/sha}","statuses_url":"https://api.github.com/repos/foursquare/rogue/statuses/{sha}","languages_url":"https://api.github.com/repos/foursquare/rogue/languages","stargazers_url":"https://api.github.com/repos/foursquare/rogue/stargazers","contributors_url":"https://api.github.com/repos/foursquare/rogue/contributors","subscribers_url":"https://api.github.com/repos/foursquare/rogue/subscribers","subscription_url":"https://api.github.com/repos/foursquare/rogue/subscription","commits_url":"https://api.github.com/repos/foursquare/rogue/commits{/sha}","git_commits_url":"https://api.github.com/repos/foursquare/rogue/git/commits{/sha}","comments_url":"https://api.github.com/repos/foursquare/rogue/comments{/number}","issue_comment_url":"https://api.github.com/repos/foursquare/rogue/issues/comments{/number}","contents_url":"https://api.github.com/repos/foursquare/rogue/contents/{+path}","compare_url":"https://api.github.com/repos/foursquare/rogue/compare/{base}...{head}","merges_url":"https://api.github.com/repos/foursquare/rogue/merges","archive_url":"https://api.github.com/repos/foursquare/rogue/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/foursquare/rogue/downloads","issues_url":"https://api.github.com/repos/foursquare/rogue/issues{/number}","pulls_url":"https://api.github.com/repos/foursquare/rogue/pulls{/number}","milestones_url":"https://api.github.com/repos/foursquare/rogue/milestones{/number}","notifications_url":"https://api.github.com/repos/foursquare/rogue/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/foursquare/rogue/labels{/name}","releases_url":"https://api.github.com/repos/foursquare/rogue/releases{/id}","created_at":"2011-01-16T03:07:58Z","updated_at":"2015-08-07T15:41:28Z","pushed_at":"2015-08-04T22:27:50Z","git_url":"git://github.com/foursquare/rogue.git","ssh_url":"git@github.com:foursquare/rogue.git","clone_url":"https://github.com/foursquare/rogue.git","svn_url":"https://github.com/foursquare/rogue","homepage":"","size":4381,"stargazers_count":496,"watchers_count":496,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":80,"mirror_url":null,"open_issues_count":7,"forks":80,"open_issues":7,"watchers":496,"default_branch":"master"}},"base":{"label":"foursquare:v3","ref":"v3","sha":"ce8e2451f2aa572370f9240809427543e3e3cc47","user":{"login":"foursquare","id":72779,"avatar_url":"https://avatars.githubusercontent.com/u/72779?v=3","gravatar_id":"","url":"https://api.github.com/users/foursquare","html_url":"https://github.com/foursquare","followers_url":"https://api.github.com/users/foursquare/followers","following_url":"https://api.github.com/users/foursquare/following{/other_user}","gists_url":"https://api.github.com/users/foursquare/gists{/gist_id}","starred_url":"https://api.github.com/users/foursquare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foursquare/subscriptions","organizations_url":"https://api.github.com/users/foursquare/orgs","repos_url":"https://api.github.com/users/foursquare/repos","events_url":"https://api.github.com/users/foursquare/events{/privacy}","received_events_url":"https://api.github.com/users/foursquare/received_events","type":"Organization","site_admin":false},"repo":{"id":1259508,"name":"rogue","full_name":"foursquare/rogue","owner":{"login":"foursquare","id":72779,"avatar_url":"https://avatars.githubusercontent.com/u/72779?v=3","gravatar_id":"","url":"https://api.github.com/users/foursquare","html_url":"https://github.com/foursquare","followers_url":"https://api.github.com/users/foursquare/followers","following_url":"https://api.github.com/users/foursquare/following{/other_user}","gists_url":"https://api.github.com/users/foursquare/gists{/gist_id}","starred_url":"https://api.github.com/users/foursquare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foursquare/subscriptions","organizations_url":"https://api.github.com/users/foursquare/orgs","repos_url":"https://api.github.com/users/foursquare/repos","events_url":"https://api.github.com/users/foursquare/events{/privacy}","received_events_url":"https://api.github.com/users/foursquare/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/foursquare/rogue","description":"A Scala DSL for MongoDB","fork":false,"url":"https://api.github.com/repos/foursquare/rogue","forks_url":"https://api.github.com/repos/foursquare/rogue/forks","keys_url":"https://api.github.com/repos/foursquare/rogue/keys{/key_id}","collaborators_url":"https://api.github.com/repos/foursquare/rogue/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/foursquare/rogue/teams","hooks_url":"https://api.github.com/repos/foursquare/rogue/hooks","issue_events_url":"https://api.github.com/repos/foursquare/rogue/issues/events{/number}","events_url":"https://api.github.com/repos/foursquare/rogue/events","assignees_url":"https://api.github.com/repos/foursquare/rogue/assignees{/user}","branches_url":"https://api.github.com/repos/foursquare/rogue/branches{/branch}","tags_url":"https://api.github.com/repos/foursquare/rogue/tags","blobs_url":"https://api.github.com/repos/foursquare/rogue/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/foursquare/rogue/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/foursquare/rogue/git/refs{/sha}","trees_url":"https://api.github.com/repos/foursquare/rogue/git/trees{/sha}","statuses_url":"https://api.github.com/repos/foursquare/rogue/statuses/{sha}","languages_url":"https://api.github.com/repos/foursquare/rogue/languages","stargazers_url":"https://api.github.com/repos/foursquare/rogue/stargazers","contributors_url":"https://api.github.com/repos/foursquare/rogue/contributors","subscribers_url":"https://api.github.com/repos/foursquare/rogue/subscribers","subscription_url":"https://api.github.com/repos/foursquare/rogue/subscription","commits_url":"https://api.github.com/repos/foursquare/rogue/commits{/sha}","git_commits_url":"https://api.github.com/repos/foursquare/rogue/git/commits{/sha}","comments_url":"https://api.github.com/repos/foursquare/rogue/comments{/number}","issue_comment_url":"https://api.github.com/repos/foursquare/rogue/issues/comments{/number}","contents_url":"https://api.github.com/repos/foursquare/rogue/contents/{+path}","compare_url":"https://api.github.com/repos/foursquare/rogue/compare/{base}...{head}","merges_url":"https://api.github.com/repos/foursquare/rogue/merges","archive_url":"https://api.github.com/repos/foursquare/rogue/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/foursquare/rogue/downloads","issues_url":"https://api.github.com/repos/foursquare/rogue/issues{/number}","pulls_url":"https://api.github.com/repos/foursquare/rogue/pulls{/number}","milestones_url":"https://api.github.com/repos/foursquare/rogue/milestones{/number}","notifications_url":"https://api.github.com/repos/foursquare/rogue/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/foursquare/rogue/labels{/name}","releases_url":"https://api.github.com/repos/foursquare/rogue/releases{/id}","created_at":"2011-01-16T03:07:58Z","updated_at":"2015-08-07T15:41:28Z","pushed_at":"2015-08-04T22:27:50Z","git_url":"git://github.com/foursquare/rogue.git","ssh_url":"git@github.com:foursquare/rogue.git","clone_url":"https://github.com/foursquare/rogue.git","svn_url":"https://github.com/foursquare/rogue","homepage":"","size":4381,"stargazers_count":496,"watchers_count":496,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":80,"mirror_url":null,"open_issues_count":7,"forks":80,"open_issues":7,"watchers":496,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/foursquare/rogue/pulls/114"},"html":{"href":"https://github.com/foursquare/rogue/pull/114"},"issue":{"href":"https://api.github.com/repos/foursquare/rogue/issues/114"},"comments":{"href":"https://api.github.com/repos/foursquare/rogue/issues/114/comments"},"review_comments":{"href":"https://api.github.com/repos/foursquare/rogue/pulls/114/comments"},"review_comment":{"href":"https://api.github.com/repos/foursquare/rogue/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/foursquare/rogue/pulls/114/commits"},"statuses":{"href":"https://api.github.com/repos/foursquare/rogue/statuses/73d2323ac88f7dd97e587df5bf7ff0d7e86afacb"}}}}