{"action":"created","comment":{"url":"https://api.github.com/repos/outworkers/phantom/pulls/comments/113066256","pull_request_review_id":34427771,"id":113066256,"diff_hunk":"@@ -0,0 +1,118 @@\n+/*\n+ * Copyright 2013 - 2017 Outworkers Ltd.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package com.outworkers.phantom\n+\n+import java.nio.ByteBuffer\n+import java.util\n+\n+import scala.collection.JavaConverters._\n+import com.datastax.driver.core.{\n+  ColumnDefinitions,\n+  ExecutionInfo,\n+  GettableByIndexData,\n+  ProtocolVersion,\n+  ResultSet => DatastaxResultSet,\n+  Row => DatastaxRow\n+}\n+import com.google.common.util.concurrent.ListenableFuture\n+\n+case class ResultSet(\n+  inner: DatastaxResultSet,\n+  version: ProtocolVersion\n+) extends DatastaxResultSet {\n+\n+  def value(): Row = new Row(one(), version)\n+\n+  override def one(): DatastaxRow = inner.one()\n+\n+  override def wasApplied(): Boolean = inner.wasApplied()\n+\n+  override def getColumnDefinitions: ColumnDefinitions = inner.getColumnDefinitions\n+\n+  override def getExecutionInfo: ExecutionInfo = inner.getExecutionInfo\n+\n+  override def fetchMoreResults: ListenableFuture[DatastaxResultSet] = inner.fetchMoreResults()\n+\n+  override def isExhausted: Boolean = inner.isExhausted\n+\n+  override def all(): util.List[DatastaxRow] = inner.all()\n+\n+  def allRows(): List[Row] = inner.all().asScala.map(r => new Row(r, version)).toList\n+\n+  override def isFullyFetched: Boolean = inner.isFullyFetched\n+\n+  override def getAllExecutionInfo: util.List[ExecutionInfo] = inner.getAllExecutionInfo\n+\n+  override def iterator: util.Iterator[DatastaxRow] = inner.iterator()\n+\n+  def iterate(): Iterator[Row] = inner.iterator().asScala.map(r => new Row(r, version))\n+\n+  override def getAvailableWithoutFetching: Int = inner.getAvailableWithoutFetching\n+}\n+\n+\n+class IndexedRow(inner: GettableByIndexData, val version: ProtocolVersion) {\n+  def getBytesUnsafe(index: Int): ByteBuffer = inner.getBytesUnsafe(index)\n+\n+  def isNull(index: Int): Boolean = inner.isNull(index)\n+}\n+\n+class Row(val inner: DatastaxRow, val version: ProtocolVersion) {\n+  def getBytesUnsafe(name: String): ByteBuffer = inner.getBytesUnsafe(name)\n+  def getBytesUnsafe(index: Int): ByteBuffer = inner.getBytesUnsafe(index)\n+\n+  def getColumnDefinitions: ColumnDefinitions = inner.getColumnDefinitions\n+\n+  def getTupleValue(name: String): IndexedRow = new IndexedRow(inner.getTupleValue(name), version)\n+\n+  def isNull(name: String): Boolean = inner.isNull(name)\n+\n+  def isNull(index: Int): Boolean = inner.isNull(index)\n+}\n+\n+\n+trait BytesExtractor[T] {\n+  def getBytesUnsafe(source: T, index: Int): ByteBuffer\n+\n+  def getBytesUnsafe(source: T, name: String): ByteBuffer\n+\n+  def isNull(source: T, name: String): Boolean\n+\n+  def isNull(source: T, index: Int): Boolean\n+\n+}\n+\n+object BytesExtractor {\n+  implicit object RowExtractor extends BytesExtractor[Row] {\n+    override def getBytesUnsafe(source: Row, index: Int): ByteBuffer = source.getBytesUnsafe(index)","path":"phantom-dsl/src/main/scala/com/outworkers/phantom/Row.scala","position":100,"original_position":100,"commit_id":"4c1849db43c5b5a10b1de2d7d9cd6b0a13029c08","original_commit_id":"4c1849db43c5b5a10b1de2d7d9cd6b0a13029c08","user":{"login":"codacy-bot","id":19940114,"avatar_url":"https://avatars2.githubusercontent.com/u/19940114?v=3","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/assets/images/favicon.png) Issue found: [Do not prefix getters with 'get'](https://www.codacy.com/app/flavian/phantom/pullRequest?prid=621475)","created_at":"2017-04-24T21:54:31Z","updated_at":"2017-04-24T21:54:31Z","html_url":"https://github.com/outworkers/phantom/pull/668#discussion_r113066256","pull_request_url":"https://api.github.com/repos/outworkers/phantom/pulls/668","_links":{"self":{"href":"https://api.github.com/repos/outworkers/phantom/pulls/comments/113066256"},"html":{"href":"https://github.com/outworkers/phantom/pull/668#discussion_r113066256"},"pull_request":{"href":"https://api.github.com/repos/outworkers/phantom/pulls/668"}}},"pull_request":{"url":"https://api.github.com/repos/outworkers/phantom/pulls/668","id":117338193,"html_url":"https://github.com/outworkers/phantom/pull/668","diff_url":"https://github.com/outworkers/phantom/pull/668.diff","patch_url":"https://github.com/outworkers/phantom/pull/668.patch","issue_url":"https://api.github.com/repos/outworkers/phantom/issues/668","number":668,"state":"open","locked":false,"title":"Feature/native parsers","user":{"login":"alexflav23","id":1645142,"avatar_url":"https://avatars1.githubusercontent.com/u/1645142?v=3","gravatar_id":"","url":"https://api.github.com/users/alexflav23","html_url":"https://github.com/alexflav23","followers_url":"https://api.github.com/users/alexflav23/followers","following_url":"https://api.github.com/users/alexflav23/following{/other_user}","gists_url":"https://api.github.com/users/alexflav23/gists{/gist_id}","starred_url":"https://api.github.com/users/alexflav23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexflav23/subscriptions","organizations_url":"https://api.github.com/users/alexflav23/orgs","repos_url":"https://api.github.com/users/alexflav23/repos","events_url":"https://api.github.com/users/alexflav23/events{/privacy}","received_events_url":"https://api.github.com/users/alexflav23/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-04-24T19:22:38Z","updated_at":"2017-04-24T21:54:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"92307ad88e1c690ec30cd22bd43ef41625182d69","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/outworkers/phantom/pulls/668/commits","review_comments_url":"https://api.github.com/repos/outworkers/phantom/pulls/668/comments","review_comment_url":"https://api.github.com/repos/outworkers/phantom/pulls/comments{/number}","comments_url":"https://api.github.com/repos/outworkers/phantom/issues/668/comments","statuses_url":"https://api.github.com/repos/outworkers/phantom/statuses/4c1849db43c5b5a10b1de2d7d9cd6b0a13029c08","head":{"label":"outworkers:feature/native_parsers","ref":"feature/native_parsers","sha":"4c1849db43c5b5a10b1de2d7d9cd6b0a13029c08","user":{"login":"outworkers","id":7896606,"avatar_url":"https://avatars1.githubusercontent.com/u/7896606?v=3","gravatar_id":"","url":"https://api.github.com/users/outworkers","html_url":"https://github.com/outworkers","followers_url":"https://api.github.com/users/outworkers/followers","following_url":"https://api.github.com/users/outworkers/following{/other_user}","gists_url":"https://api.github.com/users/outworkers/gists{/gist_id}","starred_url":"https://api.github.com/users/outworkers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/outworkers/subscriptions","organizations_url":"https://api.github.com/users/outworkers/orgs","repos_url":"https://api.github.com/users/outworkers/repos","events_url":"https://api.github.com/users/outworkers/events{/privacy}","received_events_url":"https://api.github.com/users/outworkers/received_events","type":"Organization","site_admin":false},"repo":{"id":14509195,"name":"phantom","full_name":"outworkers/phantom","owner":{"login":"outworkers","id":7896606,"avatar_url":"https://avatars1.githubusercontent.com/u/7896606?v=3","gravatar_id":"","url":"https://api.github.com/users/outworkers","html_url":"https://github.com/outworkers","followers_url":"https://api.github.com/users/outworkers/followers","following_url":"https://api.github.com/users/outworkers/following{/other_user}","gists_url":"https://api.github.com/users/outworkers/gists{/gist_id}","starred_url":"https://api.github.com/users/outworkers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/outworkers/subscriptions","organizations_url":"https://api.github.com/users/outworkers/orgs","repos_url":"https://api.github.com/users/outworkers/repos","events_url":"https://api.github.com/users/outworkers/events{/privacy}","received_events_url":"https://api.github.com/users/outworkers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/outworkers/phantom","description":"Schema safe, type-safe, reactive Scala driver for Cassandra/Datastax Enterprise","fork":false,"url":"https://api.github.com/repos/outworkers/phantom","forks_url":"https://api.github.com/repos/outworkers/phantom/forks","keys_url":"https://api.github.com/repos/outworkers/phantom/keys{/key_id}","collaborators_url":"https://api.github.com/repos/outworkers/phantom/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/outworkers/phantom/teams","hooks_url":"https://api.github.com/repos/outworkers/phantom/hooks","issue_events_url":"https://api.github.com/repos/outworkers/phantom/issues/events{/number}","events_url":"https://api.github.com/repos/outworkers/phantom/events","assignees_url":"https://api.github.com/repos/outworkers/phantom/assignees{/user}","branches_url":"https://api.github.com/repos/outworkers/phantom/branches{/branch}","tags_url":"https://api.github.com/repos/outworkers/phantom/tags","blobs_url":"https://api.github.com/repos/outworkers/phantom/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/outworkers/phantom/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/outworkers/phantom/git/refs{/sha}","trees_url":"https://api.github.com/repos/outworkers/phantom/git/trees{/sha}","statuses_url":"https://api.github.com/repos/outworkers/phantom/statuses/{sha}","languages_url":"https://api.github.com/repos/outworkers/phantom/languages","stargazers_url":"https://api.github.com/repos/outworkers/phantom/stargazers","contributors_url":"https://api.github.com/repos/outworkers/phantom/contributors","subscribers_url":"https://api.github.com/repos/outworkers/phantom/subscribers","subscription_url":"https://api.github.com/repos/outworkers/phantom/subscription","commits_url":"https://api.github.com/repos/outworkers/phantom/commits{/sha}","git_commits_url":"https://api.github.com/repos/outworkers/phantom/git/commits{/sha}","comments_url":"https://api.github.com/repos/outworkers/phantom/comments{/number}","issue_comment_url":"https://api.github.com/repos/outworkers/phantom/issues/comments{/number}","contents_url":"https://api.github.com/repos/outworkers/phantom/contents/{+path}","compare_url":"https://api.github.com/repos/outworkers/phantom/compare/{base}...{head}","merges_url":"https://api.github.com/repos/outworkers/phantom/merges","archive_url":"https://api.github.com/repos/outworkers/phantom/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/outworkers/phantom/downloads","issues_url":"https://api.github.com/repos/outworkers/phantom/issues{/number}","pulls_url":"https://api.github.com/repos/outworkers/phantom/pulls{/number}","milestones_url":"https://api.github.com/repos/outworkers/phantom/milestones{/number}","notifications_url":"https://api.github.com/repos/outworkers/phantom/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/outworkers/phantom/labels{/name}","releases_url":"https://api.github.com/repos/outworkers/phantom/releases{/id}","deployments_url":"https://api.github.com/repos/outworkers/phantom/deployments","created_at":"2013-11-19T00:08:32Z","updated_at":"2017-04-24T16:46:38Z","pushed_at":"2017-04-24T21:52:07Z","git_url":"git://github.com/outworkers/phantom.git","ssh_url":"git@github.com:outworkers/phantom.git","clone_url":"https://github.com/outworkers/phantom.git","svn_url":"https://github.com/outworkers/phantom","homepage":"http://outworkers.github.io/phantom/","size":5867,"stargazers_count":903,"watchers_count":903,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":163,"mirror_url":null,"open_issues_count":16,"forks":163,"open_issues":16,"watchers":903,"default_branch":"develop"}},"base":{"label":"outworkers:develop","ref":"develop","sha":"bd739487b904718512076a47a17461a632b6fd45","user":{"login":"outworkers","id":7896606,"avatar_url":"https://avatars1.githubusercontent.com/u/7896606?v=3","gravatar_id":"","url":"https://api.github.com/users/outworkers","html_url":"https://github.com/outworkers","followers_url":"https://api.github.com/users/outworkers/followers","following_url":"https://api.github.com/users/outworkers/following{/other_user}","gists_url":"https://api.github.com/users/outworkers/gists{/gist_id}","starred_url":"https://api.github.com/users/outworkers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/outworkers/subscriptions","organizations_url":"https://api.github.com/users/outworkers/orgs","repos_url":"https://api.github.com/users/outworkers/repos","events_url":"https://api.github.com/users/outworkers/events{/privacy}","received_events_url":"https://api.github.com/users/outworkers/received_events","type":"Organization","site_admin":false},"repo":{"id":14509195,"name":"phantom","full_name":"outworkers/phantom","owner":{"login":"outworkers","id":7896606,"avatar_url":"https://avatars1.githubusercontent.com/u/7896606?v=3","gravatar_id":"","url":"https://api.github.com/users/outworkers","html_url":"https://github.com/outworkers","followers_url":"https://api.github.com/users/outworkers/followers","following_url":"https://api.github.com/users/outworkers/following{/other_user}","gists_url":"https://api.github.com/users/outworkers/gists{/gist_id}","starred_url":"https://api.github.com/users/outworkers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/outworkers/subscriptions","organizations_url":"https://api.github.com/users/outworkers/orgs","repos_url":"https://api.github.com/users/outworkers/repos","events_url":"https://api.github.com/users/outworkers/events{/privacy}","received_events_url":"https://api.github.com/users/outworkers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/outworkers/phantom","description":"Schema safe, type-safe, reactive Scala driver for Cassandra/Datastax Enterprise","fork":false,"url":"https://api.github.com/repos/outworkers/phantom","forks_url":"https://api.github.com/repos/outworkers/phantom/forks","keys_url":"https://api.github.com/repos/outworkers/phantom/keys{/key_id}","collaborators_url":"https://api.github.com/repos/outworkers/phantom/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/outworkers/phantom/teams","hooks_url":"https://api.github.com/repos/outworkers/phantom/hooks","issue_events_url":"https://api.github.com/repos/outworkers/phantom/issues/events{/number}","events_url":"https://api.github.com/repos/outworkers/phantom/events","assignees_url":"https://api.github.com/repos/outworkers/phantom/assignees{/user}","branches_url":"https://api.github.com/repos/outworkers/phantom/branches{/branch}","tags_url":"https://api.github.com/repos/outworkers/phantom/tags","blobs_url":"https://api.github.com/repos/outworkers/phantom/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/outworkers/phantom/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/outworkers/phantom/git/refs{/sha}","trees_url":"https://api.github.com/repos/outworkers/phantom/git/trees{/sha}","statuses_url":"https://api.github.com/repos/outworkers/phantom/statuses/{sha}","languages_url":"https://api.github.com/repos/outworkers/phantom/languages","stargazers_url":"https://api.github.com/repos/outworkers/phantom/stargazers","contributors_url":"https://api.github.com/repos/outworkers/phantom/contributors","subscribers_url":"https://api.github.com/repos/outworkers/phantom/subscribers","subscription_url":"https://api.github.com/repos/outworkers/phantom/subscription","commits_url":"https://api.github.com/repos/outworkers/phantom/commits{/sha}","git_commits_url":"https://api.github.com/repos/outworkers/phantom/git/commits{/sha}","comments_url":"https://api.github.com/repos/outworkers/phantom/comments{/number}","issue_comment_url":"https://api.github.com/repos/outworkers/phantom/issues/comments{/number}","contents_url":"https://api.github.com/repos/outworkers/phantom/contents/{+path}","compare_url":"https://api.github.com/repos/outworkers/phantom/compare/{base}...{head}","merges_url":"https://api.github.com/repos/outworkers/phantom/merges","archive_url":"https://api.github.com/repos/outworkers/phantom/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/outworkers/phantom/downloads","issues_url":"https://api.github.com/repos/outworkers/phantom/issues{/number}","pulls_url":"https://api.github.com/repos/outworkers/phantom/pulls{/number}","milestones_url":"https://api.github.com/repos/outworkers/phantom/milestones{/number}","notifications_url":"https://api.github.com/repos/outworkers/phantom/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/outworkers/phantom/labels{/name}","releases_url":"https://api.github.com/repos/outworkers/phantom/releases{/id}","deployments_url":"https://api.github.com/repos/outworkers/phantom/deployments","created_at":"2013-11-19T00:08:32Z","updated_at":"2017-04-24T16:46:38Z","pushed_at":"2017-04-24T21:52:07Z","git_url":"git://github.com/outworkers/phantom.git","ssh_url":"git@github.com:outworkers/phantom.git","clone_url":"https://github.com/outworkers/phantom.git","svn_url":"https://github.com/outworkers/phantom","homepage":"http://outworkers.github.io/phantom/","size":5867,"stargazers_count":903,"watchers_count":903,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":163,"mirror_url":null,"open_issues_count":16,"forks":163,"open_issues":16,"watchers":903,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/outworkers/phantom/pulls/668"},"html":{"href":"https://github.com/outworkers/phantom/pull/668"},"issue":{"href":"https://api.github.com/repos/outworkers/phantom/issues/668"},"comments":{"href":"https://api.github.com/repos/outworkers/phantom/issues/668/comments"},"review_comments":{"href":"https://api.github.com/repos/outworkers/phantom/pulls/668/comments"},"review_comment":{"href":"https://api.github.com/repos/outworkers/phantom/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/outworkers/phantom/pulls/668/commits"},"statuses":{"href":"https://api.github.com/repos/outworkers/phantom/statuses/4c1849db43c5b5a10b1de2d7d9cd6b0a13029c08"}}}}
{"actor":{"display_login":"codacy-bot"}}