{"action":"created","comment":{"url":"https://api.github.com/repos/rstudio/rstudio/pulls/comments/70726586","id":70726586,"diff_hunk":"@@ -0,0 +1,94 @@\n+/*\n+* sql_highlight_rules.js\n+*\n+* Copyright (C) 2015 by RStudio, Inc.\n+*\n+* The Initial Developer of the Original Code is Jeffrey Arnold\n+* Portions created by the Initial Developer are Copyright (C) 2014\n+* the Initial Developer. All Rights Reserved.\n+*\n+* Unless you have received this program directly from RStudio pursuant\n+* to the terms of a commercial license agreement with RStudio, then\n+* this program is licensed to you under the terms of version 3 of the\n+* GNU Affero General Public License. This program is distributed WITHOUT\n+* ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,\n+* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the\n+* AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.\n+*\n+*/\n+\n+define(\"mode/sql_highlight_rules\", [\"require\", \"exports\", \"module\"], function(require, exports, module) {\n+\n+  var oop = require(\"ace/lib/oop\");\n+  var lang = require(\"ace/lib/lang\");\n+  var TextHighlightRules = require(\"ace/mode/text_highlight_rules\").TextHighlightRules;\n+\n+  var SqlHighlightRules = function() {\n+    var keywords = (\n+        \"select|insert|update|delete|from|where|and|or|group|by|order|limit|offset|having|as|case|\" +\n+        \"when|else|end|type|left|right|join|on|outer|desc|asc|union|create|table|primary|key|if|\" +\n+        \"foreign|not|references|default|null|inner|cross|natural|database|drop|grant\"\n+    );\n+\n+    var builtinConstants = (\n+        \"true|false\"\n+    );\n+\n+    var builtinFunctions = (\n+        \"avg|count|first|last|max|min|sum|ucase|lcase|mid|len|round|rank|now|format|\" + \n+        \"coalesce|ifnull|isnull|nvl\"\n+    );\n+\n+    var dataTypes = (\n+        \"int|numeric|decimal|date|varchar|char|bigint|float|double|bit|binary|text|set|timestamp|\" +\n+        \"money|real|number|integer\"\n+    );\n+\n+    var keywordMapper = this.createKeywordMapper({\n+        \"support.function\": builtinFunctions,\n+        \"keyword\": keywords,\n+        \"constant.language\": builtinConstants,\n+        \"storage.type\": dataTypes\n+    }, \"identifier\", true);\n+\n+    this.$rules = {","path":"src/gwt/acesupport/acemode/sql_highlight_rules.js","position":54,"original_position":54,"commit_id":"da0d981116d2c47d3e178d1e7aaf7f1b205cbd39","original_commit_id":"532895f84dc8032da36fd784224114266c0ce4b7","user":{"login":"javierluraschi","id":3478847,"avatar_url":"https://avatars.githubusercontent.com/u/3478847?v=3","gravatar_id":"","url":"https://api.github.com/users/javierluraschi","html_url":"https://github.com/javierluraschi","followers_url":"https://api.github.com/users/javierluraschi/followers","following_url":"https://api.github.com/users/javierluraschi/following{/other_user}","gists_url":"https://api.github.com/users/javierluraschi/gists{/gist_id}","starred_url":"https://api.github.com/users/javierluraschi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javierluraschi/subscriptions","organizations_url":"https://api.github.com/users/javierluraschi/orgs","repos_url":"https://api.github.com/users/javierluraschi/repos","events_url":"https://api.github.com/users/javierluraschi/events{/privacy}","received_events_url":"https://api.github.com/users/javierluraschi/received_events","type":"User","site_admin":false},"body":"`comment.doc.tag` LGTM.","created_at":"2016-07-13T23:28:41Z","updated_at":"2016-07-13T23:28:41Z","html_url":"https://github.com/rstudio/rstudio/pull/730#discussion_r70726586","pull_request_url":"https://api.github.com/repos/rstudio/rstudio/pulls/730","_links":{"self":{"href":"https://api.github.com/repos/rstudio/rstudio/pulls/comments/70726586"},"html":{"href":"https://github.com/rstudio/rstudio/pull/730#discussion_r70726586"},"pull_request":{"href":"https://api.github.com/repos/rstudio/rstudio/pulls/730"}}},"pull_request":{"url":"https://api.github.com/repos/rstudio/rstudio/pulls/730","id":77236489,"html_url":"https://github.com/rstudio/rstudio/pull/730","diff_url":"https://github.com/rstudio/rstudio/pull/730.diff","patch_url":"https://github.com/rstudio/rstudio/pull/730.patch","issue_url":"https://api.github.com/repos/rstudio/rstudio/issues/730","number":730,"state":"open","locked":false,"title":"add support for sql chunk highlights","user":{"login":"javierluraschi","id":3478847,"avatar_url":"https://avatars.githubusercontent.com/u/3478847?v=3","gravatar_id":"","url":"https://api.github.com/users/javierluraschi","html_url":"https://github.com/javierluraschi","followers_url":"https://api.github.com/users/javierluraschi/followers","following_url":"https://api.github.com/users/javierluraschi/following{/other_user}","gists_url":"https://api.github.com/users/javierluraschi/gists{/gist_id}","starred_url":"https://api.github.com/users/javierluraschi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javierluraschi/subscriptions","organizations_url":"https://api.github.com/users/javierluraschi/orgs","repos_url":"https://api.github.com/users/javierluraschi/repos","events_url":"https://api.github.com/users/javierluraschi/events{/privacy}","received_events_url":"https://api.github.com/users/javierluraschi/received_events","type":"User","site_admin":false},"body":"Support sql highlighting in chunks for knitsql integration:\r\n\r\n<img width=\"837\" alt=\"screen shot 2016-07-12 at 11 29 05 pm\" src=\"https://cloud.githubusercontent.com/assets/3478847/16793793/7720350c-4888-11e6-8958-f41eb4bfbb81.png\">","created_at":"2016-07-13T06:31:21Z","updated_at":"2016-07-13T23:28:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fa026f47a892c0391287f2e57caa20e9e9e98776","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/rstudio/rstudio/pulls/730/commits","review_comments_url":"https://api.github.com/repos/rstudio/rstudio/pulls/730/comments","review_comment_url":"https://api.github.com/repos/rstudio/rstudio/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rstudio/rstudio/issues/730/comments","statuses_url":"https://api.github.com/repos/rstudio/rstudio/statuses/da0d981116d2c47d3e178d1e7aaf7f1b205cbd39","head":{"label":"rstudio:feature/sql-chunk-highlights","ref":"feature/sql-chunk-highlights","sha":"da0d981116d2c47d3e178d1e7aaf7f1b205cbd39","user":{"login":"rstudio","id":513560,"avatar_url":"https://avatars.githubusercontent.com/u/513560?v=3","gravatar_id":"","url":"https://api.github.com/users/rstudio","html_url":"https://github.com/rstudio","followers_url":"https://api.github.com/users/rstudio/followers","following_url":"https://api.github.com/users/rstudio/following{/other_user}","gists_url":"https://api.github.com/users/rstudio/gists{/gist_id}","starred_url":"https://api.github.com/users/rstudio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rstudio/subscriptions","organizations_url":"https://api.github.com/users/rstudio/orgs","repos_url":"https://api.github.com/users/rstudio/repos","events_url":"https://api.github.com/users/rstudio/events{/privacy}","received_events_url":"https://api.github.com/users/rstudio/received_events","type":"Organization","site_admin":false},"repo":{"id":1147463,"name":"rstudio","full_name":"rstudio/rstudio","owner":{"login":"rstudio","id":513560,"avatar_url":"https://avatars.githubusercontent.com/u/513560?v=3","gravatar_id":"","url":"https://api.github.com/users/rstudio","html_url":"https://github.com/rstudio","followers_url":"https://api.github.com/users/rstudio/followers","following_url":"https://api.github.com/users/rstudio/following{/other_user}","gists_url":"https://api.github.com/users/rstudio/gists{/gist_id}","starred_url":"https://api.github.com/users/rstudio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rstudio/subscriptions","organizations_url":"https://api.github.com/users/rstudio/orgs","repos_url":"https://api.github.com/users/rstudio/repos","events_url":"https://api.github.com/users/rstudio/events{/privacy}","received_events_url":"https://api.github.com/users/rstudio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rstudio/rstudio","description":"RStudio is an integrated development environment (IDE) for R","fork":false,"url":"https://api.github.com/repos/rstudio/rstudio","forks_url":"https://api.github.com/repos/rstudio/rstudio/forks","keys_url":"https://api.github.com/repos/rstudio/rstudio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rstudio/rstudio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rstudio/rstudio/teams","hooks_url":"https://api.github.com/repos/rstudio/rstudio/hooks","issue_events_url":"https://api.github.com/repos/rstudio/rstudio/issues/events{/number}","events_url":"https://api.github.com/repos/rstudio/rstudio/events","assignees_url":"https://api.github.com/repos/rstudio/rstudio/assignees{/user}","branches_url":"https://api.github.com/repos/rstudio/rstudio/branches{/branch}","tags_url":"https://api.github.com/repos/rstudio/rstudio/tags","blobs_url":"https://api.github.com/repos/rstudio/rstudio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rstudio/rstudio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rstudio/rstudio/git/refs{/sha}","trees_url":"https://api.github.com/repos/rstudio/rstudio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rstudio/rstudio/statuses/{sha}","languages_url":"https://api.github.com/repos/rstudio/rstudio/languages","stargazers_url":"https://api.github.com/repos/rstudio/rstudio/stargazers","contributors_url":"https://api.github.com/repos/rstudio/rstudio/contributors","subscribers_url":"https://api.github.com/repos/rstudio/rstudio/subscribers","subscription_url":"https://api.github.com/repos/rstudio/rstudio/subscription","commits_url":"https://api.github.com/repos/rstudio/rstudio/commits{/sha}","git_commits_url":"https://api.github.com/repos/rstudio/rstudio/git/commits{/sha}","comments_url":"https://api.github.com/repos/rstudio/rstudio/comments{/number}","issue_comment_url":"https://api.github.com/repos/rstudio/rstudio/issues/comments{/number}","contents_url":"https://api.github.com/repos/rstudio/rstudio/contents/{+path}","compare_url":"https://api.github.com/repos/rstudio/rstudio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rstudio/rstudio/merges","archive_url":"https://api.github.com/repos/rstudio/rstudio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rstudio/rstudio/downloads","issues_url":"https://api.github.com/repos/rstudio/rstudio/issues{/number}","pulls_url":"https://api.github.com/repos/rstudio/rstudio/pulls{/number}","milestones_url":"https://api.github.com/repos/rstudio/rstudio/milestones{/number}","notifications_url":"https://api.github.com/repos/rstudio/rstudio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rstudio/rstudio/labels{/name}","releases_url":"https://api.github.com/repos/rstudio/rstudio/releases{/id}","deployments_url":"https://api.github.com/repos/rstudio/rstudio/deployments","created_at":"2010-12-07T19:10:25Z","updated_at":"2016-07-13T18:51:31Z","pushed_at":"2016-07-13T23:28:12Z","git_url":"git://github.com/rstudio/rstudio.git","ssh_url":"git@github.com:rstudio/rstudio.git","clone_url":"https://github.com/rstudio/rstudio.git","svn_url":"https://github.com/rstudio/rstudio","homepage":"http://www.rstudio.org","size":96369,"stargazers_count":1378,"watchers_count":1378,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":352,"mirror_url":null,"open_issues_count":5,"forks":352,"open_issues":5,"watchers":1378,"default_branch":"master"}},"base":{"label":"rstudio:master","ref":"master","sha":"d2c000b47da60fb303aee4f5ccd72c91a7c405ef","user":{"login":"rstudio","id":513560,"avatar_url":"https://avatars.githubusercontent.com/u/513560?v=3","gravatar_id":"","url":"https://api.github.com/users/rstudio","html_url":"https://github.com/rstudio","followers_url":"https://api.github.com/users/rstudio/followers","following_url":"https://api.github.com/users/rstudio/following{/other_user}","gists_url":"https://api.github.com/users/rstudio/gists{/gist_id}","starred_url":"https://api.github.com/users/rstudio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rstudio/subscriptions","organizations_url":"https://api.github.com/users/rstudio/orgs","repos_url":"https://api.github.com/users/rstudio/repos","events_url":"https://api.github.com/users/rstudio/events{/privacy}","received_events_url":"https://api.github.com/users/rstudio/received_events","type":"Organization","site_admin":false},"repo":{"id":1147463,"name":"rstudio","full_name":"rstudio/rstudio","owner":{"login":"rstudio","id":513560,"avatar_url":"https://avatars.githubusercontent.com/u/513560?v=3","gravatar_id":"","url":"https://api.github.com/users/rstudio","html_url":"https://github.com/rstudio","followers_url":"https://api.github.com/users/rstudio/followers","following_url":"https://api.github.com/users/rstudio/following{/other_user}","gists_url":"https://api.github.com/users/rstudio/gists{/gist_id}","starred_url":"https://api.github.com/users/rstudio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rstudio/subscriptions","organizations_url":"https://api.github.com/users/rstudio/orgs","repos_url":"https://api.github.com/users/rstudio/repos","events_url":"https://api.github.com/users/rstudio/events{/privacy}","received_events_url":"https://api.github.com/users/rstudio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rstudio/rstudio","description":"RStudio is an integrated development environment (IDE) for R","fork":false,"url":"https://api.github.com/repos/rstudio/rstudio","forks_url":"https://api.github.com/repos/rstudio/rstudio/forks","keys_url":"https://api.github.com/repos/rstudio/rstudio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rstudio/rstudio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rstudio/rstudio/teams","hooks_url":"https://api.github.com/repos/rstudio/rstudio/hooks","issue_events_url":"https://api.github.com/repos/rstudio/rstudio/issues/events{/number}","events_url":"https://api.github.com/repos/rstudio/rstudio/events","assignees_url":"https://api.github.com/repos/rstudio/rstudio/assignees{/user}","branches_url":"https://api.github.com/repos/rstudio/rstudio/branches{/branch}","tags_url":"https://api.github.com/repos/rstudio/rstudio/tags","blobs_url":"https://api.github.com/repos/rstudio/rstudio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rstudio/rstudio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rstudio/rstudio/git/refs{/sha}","trees_url":"https://api.github.com/repos/rstudio/rstudio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rstudio/rstudio/statuses/{sha}","languages_url":"https://api.github.com/repos/rstudio/rstudio/languages","stargazers_url":"https://api.github.com/repos/rstudio/rstudio/stargazers","contributors_url":"https://api.github.com/repos/rstudio/rstudio/contributors","subscribers_url":"https://api.github.com/repos/rstudio/rstudio/subscribers","subscription_url":"https://api.github.com/repos/rstudio/rstudio/subscription","commits_url":"https://api.github.com/repos/rstudio/rstudio/commits{/sha}","git_commits_url":"https://api.github.com/repos/rstudio/rstudio/git/commits{/sha}","comments_url":"https://api.github.com/repos/rstudio/rstudio/comments{/number}","issue_comment_url":"https://api.github.com/repos/rstudio/rstudio/issues/comments{/number}","contents_url":"https://api.github.com/repos/rstudio/rstudio/contents/{+path}","compare_url":"https://api.github.com/repos/rstudio/rstudio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rstudio/rstudio/merges","archive_url":"https://api.github.com/repos/rstudio/rstudio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rstudio/rstudio/downloads","issues_url":"https://api.github.com/repos/rstudio/rstudio/issues{/number}","pulls_url":"https://api.github.com/repos/rstudio/rstudio/pulls{/number}","milestones_url":"https://api.github.com/repos/rstudio/rstudio/milestones{/number}","notifications_url":"https://api.github.com/repos/rstudio/rstudio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rstudio/rstudio/labels{/name}","releases_url":"https://api.github.com/repos/rstudio/rstudio/releases{/id}","deployments_url":"https://api.github.com/repos/rstudio/rstudio/deployments","created_at":"2010-12-07T19:10:25Z","updated_at":"2016-07-13T18:51:31Z","pushed_at":"2016-07-13T23:28:12Z","git_url":"git://github.com/rstudio/rstudio.git","ssh_url":"git@github.com:rstudio/rstudio.git","clone_url":"https://github.com/rstudio/rstudio.git","svn_url":"https://github.com/rstudio/rstudio","homepage":"http://www.rstudio.org","size":96369,"stargazers_count":1378,"watchers_count":1378,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":352,"mirror_url":null,"open_issues_count":5,"forks":352,"open_issues":5,"watchers":1378,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rstudio/rstudio/pulls/730"},"html":{"href":"https://github.com/rstudio/rstudio/pull/730"},"issue":{"href":"https://api.github.com/repos/rstudio/rstudio/issues/730"},"comments":{"href":"https://api.github.com/repos/rstudio/rstudio/issues/730/comments"},"review_comments":{"href":"https://api.github.com/repos/rstudio/rstudio/pulls/730/comments"},"review_comment":{"href":"https://api.github.com/repos/rstudio/rstudio/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rstudio/rstudio/pulls/730/commits"},"statuses":{"href":"https://api.github.com/repos/rstudio/rstudio/statuses/da0d981116d2c47d3e178d1e7aaf7f1b205cbd39"}}}}
{"actor":{"display_login":"javierluraschi"}}