{"action":"created","comment":{"url":"https://api.github.com/repos/tests-always-included/style-guide/pulls/comments/84375315","pull_request_review_id":5158306,"id":84375315,"diff_hunk":"@@ -0,0 +1,61 @@\n+---\n+title: Style Guide for SQL\n+pageid: lang-sql\n+---\n+\n+\n+Keywords\n+--------\n+\n+All keywords should be uppercase.\n+\n+    SELECT COUNT(*)\n+    WHERE DATEDIFF(NOW(), someTable.timeStamp)\n+    ORDER BY ASC\n+\n+\n+Indentation and Whitespace\n+--------------------------\n+\n+Clauses should be separated by newlines.\n+\n+    SELECT *\n+    FROM someTable\n+    ORDER BY someField DESC\n+\n+When using \"SELECT\" on multiple columns, place the columns on the same line.\n+\n+    SELECT this, that, and, the, other\n+    FROM someTable\n+\n+\"AND\" should be dropped onto a newline and given an additional indentation of four spaces relative to the clause it's a part of.\n+\n+    SELECT *\n+    FROM someTable\n+    WHERE column1 = true\n+        AND column2 = \"someValue\"\n+        AND column3 = false\n+\n+IN, AS, and OR should all be placed on the same line as the clause they are a part of.\n+\n+    SELECT *\n+    FROM someTable AS st\n+    WHERE column IN (\"column1\", \"column2\")\n+\n+Queries embedded in other code should be offset from the rest of the code.\n+\n+    return db->query(\"\n+        SELECT *\n+        FROM someTable\n+    \")\n+\n+The above rules apply for all subqueries as well. Subqueries should also be started on a newline and indented an additional for space.\n+\n+    SELECT *\n+    FROM (\n+        SELECT id AS someAlias, exampleColumn\n+        FROM someTable\n+        LIMIT 3\n+    )\n+    ORDER BY DESC","path":"lang/sql/index.md","position":60,"original_position":60,"commit_id":"5b2f0e518ae0a88b00b04a394336466c6b6693a0","original_commit_id":"5b2f0e518ae0a88b00b04a394336466c6b6693a0","user":{"login":"lnagle93","id":13711016,"avatar_url":"https://avatars.githubusercontent.com/u/13711016?v=3","gravatar_id":"","url":"https://api.github.com/users/lnagle93","html_url":"https://github.com/lnagle93","followers_url":"https://api.github.com/users/lnagle93/followers","following_url":"https://api.github.com/users/lnagle93/following{/other_user}","gists_url":"https://api.github.com/users/lnagle93/gists{/gist_id}","starred_url":"https://api.github.com/users/lnagle93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lnagle93/subscriptions","organizations_url":"https://api.github.com/users/lnagle93/orgs","repos_url":"https://api.github.com/users/lnagle93/repos","events_url":"https://api.github.com/users/lnagle93/events{/privacy}","received_events_url":"https://api.github.com/users/lnagle93/received_events","type":"User","site_admin":false},"body":"Fixed.","created_at":"2016-10-20T21:02:40Z","updated_at":"2016-10-20T21:02:40Z","html_url":"https://github.com/tests-always-included/style-guide/pull/4#discussion_r84375315","pull_request_url":"https://api.github.com/repos/tests-always-included/style-guide/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/tests-always-included/style-guide/pulls/comments/84375315"},"html":{"href":"https://github.com/tests-always-included/style-guide/pull/4#discussion_r84375315"},"pull_request":{"href":"https://api.github.com/repos/tests-always-included/style-guide/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/tests-always-included/style-guide/pulls/4","id":90245896,"html_url":"https://github.com/tests-always-included/style-guide/pull/4","diff_url":"https://github.com/tests-always-included/style-guide/pull/4.diff","patch_url":"https://github.com/tests-always-included/style-guide/pull/4.patch","issue_url":"https://api.github.com/repos/tests-always-included/style-guide/issues/4","number":4,"state":"open","locked":false,"title":"Add SQL style guide","user":{"login":"lnagle93","id":13711016,"avatar_url":"https://avatars.githubusercontent.com/u/13711016?v=3","gravatar_id":"","url":"https://api.github.com/users/lnagle93","html_url":"https://github.com/lnagle93","followers_url":"https://api.github.com/users/lnagle93/followers","following_url":"https://api.github.com/users/lnagle93/following{/other_user}","gists_url":"https://api.github.com/users/lnagle93/gists{/gist_id}","starred_url":"https://api.github.com/users/lnagle93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lnagle93/subscriptions","organizations_url":"https://api.github.com/users/lnagle93/orgs","repos_url":"https://api.github.com/users/lnagle93/repos","events_url":"https://api.github.com/users/lnagle93/events{/privacy}","received_events_url":"https://api.github.com/users/lnagle93/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-20T17:30:58Z","updated_at":"2016-10-20T21:02:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5b334baff56a1c2b2bcf556de8e7889cef10ea44","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/tests-always-included/style-guide/pulls/4/commits","review_comments_url":"https://api.github.com/repos/tests-always-included/style-guide/pulls/4/comments","review_comment_url":"https://api.github.com/repos/tests-always-included/style-guide/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tests-always-included/style-guide/issues/4/comments","statuses_url":"https://api.github.com/repos/tests-always-included/style-guide/statuses/5b2f0e518ae0a88b00b04a394336466c6b6693a0","head":{"label":"lnagle93:sql","ref":"sql","sha":"5b2f0e518ae0a88b00b04a394336466c6b6693a0","user":{"login":"lnagle93","id":13711016,"avatar_url":"https://avatars.githubusercontent.com/u/13711016?v=3","gravatar_id":"","url":"https://api.github.com/users/lnagle93","html_url":"https://github.com/lnagle93","followers_url":"https://api.github.com/users/lnagle93/followers","following_url":"https://api.github.com/users/lnagle93/following{/other_user}","gists_url":"https://api.github.com/users/lnagle93/gists{/gist_id}","starred_url":"https://api.github.com/users/lnagle93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lnagle93/subscriptions","organizations_url":"https://api.github.com/users/lnagle93/orgs","repos_url":"https://api.github.com/users/lnagle93/repos","events_url":"https://api.github.com/users/lnagle93/events{/privacy}","received_events_url":"https://api.github.com/users/lnagle93/received_events","type":"User","site_admin":false},"repo":{"id":71487221,"name":"style-guide","full_name":"lnagle93/style-guide","owner":{"login":"lnagle93","id":13711016,"avatar_url":"https://avatars.githubusercontent.com/u/13711016?v=3","gravatar_id":"","url":"https://api.github.com/users/lnagle93","html_url":"https://github.com/lnagle93","followers_url":"https://api.github.com/users/lnagle93/followers","following_url":"https://api.github.com/users/lnagle93/following{/other_user}","gists_url":"https://api.github.com/users/lnagle93/gists{/gist_id}","starred_url":"https://api.github.com/users/lnagle93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lnagle93/subscriptions","organizations_url":"https://api.github.com/users/lnagle93/orgs","repos_url":"https://api.github.com/users/lnagle93/repos","events_url":"https://api.github.com/users/lnagle93/events{/privacy}","received_events_url":"https://api.github.com/users/lnagle93/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lnagle93/style-guide","description":"A collection of style guides for various languages.  One guide to rule them all.","fork":true,"url":"https://api.github.com/repos/lnagle93/style-guide","forks_url":"https://api.github.com/repos/lnagle93/style-guide/forks","keys_url":"https://api.github.com/repos/lnagle93/style-guide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lnagle93/style-guide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lnagle93/style-guide/teams","hooks_url":"https://api.github.com/repos/lnagle93/style-guide/hooks","issue_events_url":"https://api.github.com/repos/lnagle93/style-guide/issues/events{/number}","events_url":"https://api.github.com/repos/lnagle93/style-guide/events","assignees_url":"https://api.github.com/repos/lnagle93/style-guide/assignees{/user}","branches_url":"https://api.github.com/repos/lnagle93/style-guide/branches{/branch}","tags_url":"https://api.github.com/repos/lnagle93/style-guide/tags","blobs_url":"https://api.github.com/repos/lnagle93/style-guide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lnagle93/style-guide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lnagle93/style-guide/git/refs{/sha}","trees_url":"https://api.github.com/repos/lnagle93/style-guide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lnagle93/style-guide/statuses/{sha}","languages_url":"https://api.github.com/repos/lnagle93/style-guide/languages","stargazers_url":"https://api.github.com/repos/lnagle93/style-guide/stargazers","contributors_url":"https://api.github.com/repos/lnagle93/style-guide/contributors","subscribers_url":"https://api.github.com/repos/lnagle93/style-guide/subscribers","subscription_url":"https://api.github.com/repos/lnagle93/style-guide/subscription","commits_url":"https://api.github.com/repos/lnagle93/style-guide/commits{/sha}","git_commits_url":"https://api.github.com/repos/lnagle93/style-guide/git/commits{/sha}","comments_url":"https://api.github.com/repos/lnagle93/style-guide/comments{/number}","issue_comment_url":"https://api.github.com/repos/lnagle93/style-guide/issues/comments{/number}","contents_url":"https://api.github.com/repos/lnagle93/style-guide/contents/{+path}","compare_url":"https://api.github.com/repos/lnagle93/style-guide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lnagle93/style-guide/merges","archive_url":"https://api.github.com/repos/lnagle93/style-guide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lnagle93/style-guide/downloads","issues_url":"https://api.github.com/repos/lnagle93/style-guide/issues{/number}","pulls_url":"https://api.github.com/repos/lnagle93/style-guide/pulls{/number}","milestones_url":"https://api.github.com/repos/lnagle93/style-guide/milestones{/number}","notifications_url":"https://api.github.com/repos/lnagle93/style-guide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lnagle93/style-guide/labels{/name}","releases_url":"https://api.github.com/repos/lnagle93/style-guide/releases{/id}","deployments_url":"https://api.github.com/repos/lnagle93/style-guide/deployments","created_at":"2016-10-20T17:27:15Z","updated_at":"2016-10-20T17:27:16Z","pushed_at":"2016-10-20T18:06:47Z","git_url":"git://github.com/lnagle93/style-guide.git","ssh_url":"git@github.com:lnagle93/style-guide.git","clone_url":"https://github.com/lnagle93/style-guide.git","svn_url":"https://github.com/lnagle93/style-guide","homepage":null,"size":785,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"tests-always-included:master","ref":"master","sha":"3636f7d10dfc12700dbe433fd9cb9a8621a0381f","user":{"login":"tests-always-included","id":6856312,"avatar_url":"https://avatars.githubusercontent.com/u/6856312?v=3","gravatar_id":"","url":"https://api.github.com/users/tests-always-included","html_url":"https://github.com/tests-always-included","followers_url":"https://api.github.com/users/tests-always-included/followers","following_url":"https://api.github.com/users/tests-always-included/following{/other_user}","gists_url":"https://api.github.com/users/tests-always-included/gists{/gist_id}","starred_url":"https://api.github.com/users/tests-always-included/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tests-always-included/subscriptions","organizations_url":"https://api.github.com/users/tests-always-included/orgs","repos_url":"https://api.github.com/users/tests-always-included/repos","events_url":"https://api.github.com/users/tests-always-included/events{/privacy}","received_events_url":"https://api.github.com/users/tests-always-included/received_events","type":"Organization","site_admin":false},"repo":{"id":68127180,"name":"style-guide","full_name":"tests-always-included/style-guide","owner":{"login":"tests-always-included","id":6856312,"avatar_url":"https://avatars.githubusercontent.com/u/6856312?v=3","gravatar_id":"","url":"https://api.github.com/users/tests-always-included","html_url":"https://github.com/tests-always-included","followers_url":"https://api.github.com/users/tests-always-included/followers","following_url":"https://api.github.com/users/tests-always-included/following{/other_user}","gists_url":"https://api.github.com/users/tests-always-included/gists{/gist_id}","starred_url":"https://api.github.com/users/tests-always-included/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tests-always-included/subscriptions","organizations_url":"https://api.github.com/users/tests-always-included/orgs","repos_url":"https://api.github.com/users/tests-always-included/repos","events_url":"https://api.github.com/users/tests-always-included/events{/privacy}","received_events_url":"https://api.github.com/users/tests-always-included/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tests-always-included/style-guide","description":"A collection of style guides for various languages.  One guide to rule them all.","fork":false,"url":"https://api.github.com/repos/tests-always-included/style-guide","forks_url":"https://api.github.com/repos/tests-always-included/style-guide/forks","keys_url":"https://api.github.com/repos/tests-always-included/style-guide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tests-always-included/style-guide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tests-always-included/style-guide/teams","hooks_url":"https://api.github.com/repos/tests-always-included/style-guide/hooks","issue_events_url":"https://api.github.com/repos/tests-always-included/style-guide/issues/events{/number}","events_url":"https://api.github.com/repos/tests-always-included/style-guide/events","assignees_url":"https://api.github.com/repos/tests-always-included/style-guide/assignees{/user}","branches_url":"https://api.github.com/repos/tests-always-included/style-guide/branches{/branch}","tags_url":"https://api.github.com/repos/tests-always-included/style-guide/tags","blobs_url":"https://api.github.com/repos/tests-always-included/style-guide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tests-always-included/style-guide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tests-always-included/style-guide/git/refs{/sha}","trees_url":"https://api.github.com/repos/tests-always-included/style-guide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tests-always-included/style-guide/statuses/{sha}","languages_url":"https://api.github.com/repos/tests-always-included/style-guide/languages","stargazers_url":"https://api.github.com/repos/tests-always-included/style-guide/stargazers","contributors_url":"https://api.github.com/repos/tests-always-included/style-guide/contributors","subscribers_url":"https://api.github.com/repos/tests-always-included/style-guide/subscribers","subscription_url":"https://api.github.com/repos/tests-always-included/style-guide/subscription","commits_url":"https://api.github.com/repos/tests-always-included/style-guide/commits{/sha}","git_commits_url":"https://api.github.com/repos/tests-always-included/style-guide/git/commits{/sha}","comments_url":"https://api.github.com/repos/tests-always-included/style-guide/comments{/number}","issue_comment_url":"https://api.github.com/repos/tests-always-included/style-guide/issues/comments{/number}","contents_url":"https://api.github.com/repos/tests-always-included/style-guide/contents/{+path}","compare_url":"https://api.github.com/repos/tests-always-included/style-guide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tests-always-included/style-guide/merges","archive_url":"https://api.github.com/repos/tests-always-included/style-guide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tests-always-included/style-guide/downloads","issues_url":"https://api.github.com/repos/tests-always-included/style-guide/issues{/number}","pulls_url":"https://api.github.com/repos/tests-always-included/style-guide/pulls{/number}","milestones_url":"https://api.github.com/repos/tests-always-included/style-guide/milestones{/number}","notifications_url":"https://api.github.com/repos/tests-always-included/style-guide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tests-always-included/style-guide/labels{/name}","releases_url":"https://api.github.com/repos/tests-always-included/style-guide/releases{/id}","deployments_url":"https://api.github.com/repos/tests-always-included/style-guide/deployments","created_at":"2016-09-13T16:39:00Z","updated_at":"2016-10-15T20:36:49Z","pushed_at":"2016-10-20T18:06:47Z","git_url":"git://github.com/tests-always-included/style-guide.git","ssh_url":"git@github.com:tests-always-included/style-guide.git","clone_url":"https://github.com/tests-always-included/style-guide.git","svn_url":"https://github.com/tests-always-included/style-guide","homepage":null,"size":786,"stargazers_count":2,"watchers_count":2,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tests-always-included/style-guide/pulls/4"},"html":{"href":"https://github.com/tests-always-included/style-guide/pull/4"},"issue":{"href":"https://api.github.com/repos/tests-always-included/style-guide/issues/4"},"comments":{"href":"https://api.github.com/repos/tests-always-included/style-guide/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/tests-always-included/style-guide/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/tests-always-included/style-guide/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tests-always-included/style-guide/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/tests-always-included/style-guide/statuses/5b2f0e518ae0a88b00b04a394336466c6b6693a0"}}}}
{"actor":{"display_login":"lnagle93"}}