{"action":"created","comment":{"url":"https://api.github.com/repos/sgrif/diesel/pulls/comments/51758342","id":51758342,"diff_hunk":"@@ -0,0 +1,406 @@\n+Getting Started 2.0\n+===\n+\n+For this guide, we're going to walk through some simple examples for each of the\n+pieces of CRUD. Each step in this guide will build on the previous, and is meant\n+to be followed along. This guide assumes that you're using PostgreSQL on\n+Rust nightly. We'll talk about how to use Diesel on stable Rust in the final\n+chapter. Before we start, make sure you have PostgreSQL installed and running.\n+\n+The first thing we need to do is generate our project.\n+\n+```shell\n+cargo new diesel_demo\n+cd diesel_demo\n+```\n+\n+First, let's add Diesel to our dependencies. We're also going to use a tool\n+called [`.env`][dotenv-rust] to manage our environment variables for us. We'll\n+add it to our dependencies as well.\n+\n+[dotenv-rust]: https://github.com/slapresta/rust-dotenv\n+","path":"guide.md","position":22,"original_position":22,"commit_id":"8fae5ffc16d0ee7ab8d51c7b5a6b5fda7163ef49","original_commit_id":"8fae5ffc16d0ee7ab8d51c7b5a6b5fda7163ef49","user":{"login":"sgrif","id":1529387,"avatar_url":"https://avatars.githubusercontent.com/u/1529387?v=3","gravatar_id":"","url":"https://api.github.com/users/sgrif","html_url":"https://github.com/sgrif","followers_url":"https://api.github.com/users/sgrif/followers","following_url":"https://api.github.com/users/sgrif/following{/other_user}","gists_url":"https://api.github.com/users/sgrif/gists{/gist_id}","starred_url":"https://api.github.com/users/sgrif/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgrif/subscriptions","organizations_url":"https://api.github.com/users/sgrif/orgs","repos_url":"https://api.github.com/users/sgrif/repos","events_url":"https://api.github.com/users/sgrif/events{/privacy}","received_events_url":"https://api.github.com/users/sgrif/received_events","type":"User","site_admin":false},"body":"Yes, this will go into those little terminal windows with the file name in the top bar","created_at":"2016-02-03T17:46:58Z","updated_at":"2016-02-03T17:46:58Z","html_url":"https://github.com/sgrif/diesel/pull/181#discussion_r51758342","pull_request_url":"https://api.github.com/repos/sgrif/diesel/pulls/181","_links":{"self":{"href":"https://api.github.com/repos/sgrif/diesel/pulls/comments/51758342"},"html":{"href":"https://github.com/sgrif/diesel/pull/181#discussion_r51758342"},"pull_request":{"href":"https://api.github.com/repos/sgrif/diesel/pulls/181"}}},"pull_request":{"url":"https://api.github.com/repos/sgrif/diesel/pulls/181","id":58077022,"html_url":"https://github.com/sgrif/diesel/pull/181","diff_url":"https://github.com/sgrif/diesel/pull/181.diff","patch_url":"https://github.com/sgrif/diesel/pull/181.patch","issue_url":"https://api.github.com/repos/sgrif/diesel/issues/181","number":181,"state":"open","locked":false,"title":"Add a new getting started guide","user":{"login":"sgrif","id":1529387,"avatar_url":"https://avatars.githubusercontent.com/u/1529387?v=3","gravatar_id":"","url":"https://api.github.com/users/sgrif","html_url":"https://github.com/sgrif","followers_url":"https://api.github.com/users/sgrif/followers","following_url":"https://api.github.com/users/sgrif/following{/other_user}","gists_url":"https://api.github.com/users/sgrif/gists{/gist_id}","starred_url":"https://api.github.com/users/sgrif/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgrif/subscriptions","organizations_url":"https://api.github.com/users/sgrif/orgs","repos_url":"https://api.github.com/users/sgrif/repos","events_url":"https://api.github.com/users/sgrif/events{/privacy}","received_events_url":"https://api.github.com/users/sgrif/received_events","type":"User","site_admin":false},"body":"[Rendered](https://github.com/sgrif/diesel/blob/sg-new-guide/guide.md)\r\n\r\nThis is not actually meant for this repo, this will end up on the new\r\nwebsite. However, I wanted to write out all the content in markdown and\r\nreview it here before I go through all the formatting, etc over there.\r\n\r\nAfter the website is live, the README will get slimmed down by quite a\r\nlot, mostly pointing to this guide. One thing that I couldn't figure out\r\nhow to fit in naturally was passing a struct to `update().set`, or using\r\nmethods like `save_changes`. Maybe it's fine to skip them, as this isn't\r\nintended to be an exhaustive guide?\r\n\r\nI also want to follow this up with an \"advanced\" guide that covers joins\r\nand associations in 0.6.","created_at":"2016-02-03T01:09:12Z","updated_at":"2016-02-03T17:46:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9c6351a96b45bc6bb19eb3fc64c39ea17d2adeff","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sgrif/diesel/pulls/181/commits","review_comments_url":"https://api.github.com/repos/sgrif/diesel/pulls/181/comments","review_comment_url":"https://api.github.com/repos/sgrif/diesel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sgrif/diesel/issues/181/comments","statuses_url":"https://api.github.com/repos/sgrif/diesel/statuses/8fae5ffc16d0ee7ab8d51c7b5a6b5fda7163ef49","head":{"label":"sgrif:sg-new-guide","ref":"sg-new-guide","sha":"8fae5ffc16d0ee7ab8d51c7b5a6b5fda7163ef49","user":{"login":"sgrif","id":1529387,"avatar_url":"https://avatars.githubusercontent.com/u/1529387?v=3","gravatar_id":"","url":"https://api.github.com/users/sgrif","html_url":"https://github.com/sgrif","followers_url":"https://api.github.com/users/sgrif/followers","following_url":"https://api.github.com/users/sgrif/following{/other_user}","gists_url":"https://api.github.com/users/sgrif/gists{/gist_id}","starred_url":"https://api.github.com/users/sgrif/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgrif/subscriptions","organizations_url":"https://api.github.com/users/sgrif/orgs","repos_url":"https://api.github.com/users/sgrif/repos","events_url":"https://api.github.com/users/sgrif/events{/privacy}","received_events_url":"https://api.github.com/users/sgrif/received_events","type":"User","site_admin":false},"repo":{"id":41609775,"name":"diesel","full_name":"sgrif/diesel","owner":{"login":"sgrif","id":1529387,"avatar_url":"https://avatars.githubusercontent.com/u/1529387?v=3","gravatar_id":"","url":"https://api.github.com/users/sgrif","html_url":"https://github.com/sgrif","followers_url":"https://api.github.com/users/sgrif/followers","following_url":"https://api.github.com/users/sgrif/following{/other_user}","gists_url":"https://api.github.com/users/sgrif/gists{/gist_id}","starred_url":"https://api.github.com/users/sgrif/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgrif/subscriptions","organizations_url":"https://api.github.com/users/sgrif/orgs","repos_url":"https://api.github.com/users/sgrif/repos","events_url":"https://api.github.com/users/sgrif/events{/privacy}","received_events_url":"https://api.github.com/users/sgrif/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sgrif/diesel","description":"A safe, extensible ORM and Query Builder for Rust","fork":false,"url":"https://api.github.com/repos/sgrif/diesel","forks_url":"https://api.github.com/repos/sgrif/diesel/forks","keys_url":"https://api.github.com/repos/sgrif/diesel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sgrif/diesel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sgrif/diesel/teams","hooks_url":"https://api.github.com/repos/sgrif/diesel/hooks","issue_events_url":"https://api.github.com/repos/sgrif/diesel/issues/events{/number}","events_url":"https://api.github.com/repos/sgrif/diesel/events","assignees_url":"https://api.github.com/repos/sgrif/diesel/assignees{/user}","branches_url":"https://api.github.com/repos/sgrif/diesel/branches{/branch}","tags_url":"https://api.github.com/repos/sgrif/diesel/tags","blobs_url":"https://api.github.com/repos/sgrif/diesel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sgrif/diesel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sgrif/diesel/git/refs{/sha}","trees_url":"https://api.github.com/repos/sgrif/diesel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sgrif/diesel/statuses/{sha}","languages_url":"https://api.github.com/repos/sgrif/diesel/languages","stargazers_url":"https://api.github.com/repos/sgrif/diesel/stargazers","contributors_url":"https://api.github.com/repos/sgrif/diesel/contributors","subscribers_url":"https://api.github.com/repos/sgrif/diesel/subscribers","subscription_url":"https://api.github.com/repos/sgrif/diesel/subscription","commits_url":"https://api.github.com/repos/sgrif/diesel/commits{/sha}","git_commits_url":"https://api.github.com/repos/sgrif/diesel/git/commits{/sha}","comments_url":"https://api.github.com/repos/sgrif/diesel/comments{/number}","issue_comment_url":"https://api.github.com/repos/sgrif/diesel/issues/comments{/number}","contents_url":"https://api.github.com/repos/sgrif/diesel/contents/{+path}","compare_url":"https://api.github.com/repos/sgrif/diesel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sgrif/diesel/merges","archive_url":"https://api.github.com/repos/sgrif/diesel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sgrif/diesel/downloads","issues_url":"https://api.github.com/repos/sgrif/diesel/issues{/number}","pulls_url":"https://api.github.com/repos/sgrif/diesel/pulls{/number}","milestones_url":"https://api.github.com/repos/sgrif/diesel/milestones{/number}","notifications_url":"https://api.github.com/repos/sgrif/diesel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sgrif/diesel/labels{/name}","releases_url":"https://api.github.com/repos/sgrif/diesel/releases{/id}","deployments_url":"https://api.github.com/repos/sgrif/diesel/deployments","created_at":"2015-08-29T22:51:00Z","updated_at":"2016-02-02T23:32:33Z","pushed_at":"2016-02-03T17:26:26Z","git_url":"git://github.com/sgrif/diesel.git","ssh_url":"git@github.com:sgrif/diesel.git","clone_url":"https://github.com/sgrif/diesel.git","svn_url":"https://github.com/sgrif/diesel","homepage":"","size":3334,"stargazers_count":444,"watchers_count":444,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":35,"mirror_url":null,"open_issues_count":38,"forks":35,"open_issues":38,"watchers":444,"default_branch":"master"}},"base":{"label":"sgrif:master","ref":"master","sha":"b1a215bd906039e2f4fa7e1af6259acd0f06129a","user":{"login":"sgrif","id":1529387,"avatar_url":"https://avatars.githubusercontent.com/u/1529387?v=3","gravatar_id":"","url":"https://api.github.com/users/sgrif","html_url":"https://github.com/sgrif","followers_url":"https://api.github.com/users/sgrif/followers","following_url":"https://api.github.com/users/sgrif/following{/other_user}","gists_url":"https://api.github.com/users/sgrif/gists{/gist_id}","starred_url":"https://api.github.com/users/sgrif/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgrif/subscriptions","organizations_url":"https://api.github.com/users/sgrif/orgs","repos_url":"https://api.github.com/users/sgrif/repos","events_url":"https://api.github.com/users/sgrif/events{/privacy}","received_events_url":"https://api.github.com/users/sgrif/received_events","type":"User","site_admin":false},"repo":{"id":41609775,"name":"diesel","full_name":"sgrif/diesel","owner":{"login":"sgrif","id":1529387,"avatar_url":"https://avatars.githubusercontent.com/u/1529387?v=3","gravatar_id":"","url":"https://api.github.com/users/sgrif","html_url":"https://github.com/sgrif","followers_url":"https://api.github.com/users/sgrif/followers","following_url":"https://api.github.com/users/sgrif/following{/other_user}","gists_url":"https://api.github.com/users/sgrif/gists{/gist_id}","starred_url":"https://api.github.com/users/sgrif/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgrif/subscriptions","organizations_url":"https://api.github.com/users/sgrif/orgs","repos_url":"https://api.github.com/users/sgrif/repos","events_url":"https://api.github.com/users/sgrif/events{/privacy}","received_events_url":"https://api.github.com/users/sgrif/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sgrif/diesel","description":"A safe, extensible ORM and Query Builder for Rust","fork":false,"url":"https://api.github.com/repos/sgrif/diesel","forks_url":"https://api.github.com/repos/sgrif/diesel/forks","keys_url":"https://api.github.com/repos/sgrif/diesel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sgrif/diesel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sgrif/diesel/teams","hooks_url":"https://api.github.com/repos/sgrif/diesel/hooks","issue_events_url":"https://api.github.com/repos/sgrif/diesel/issues/events{/number}","events_url":"https://api.github.com/repos/sgrif/diesel/events","assignees_url":"https://api.github.com/repos/sgrif/diesel/assignees{/user}","branches_url":"https://api.github.com/repos/sgrif/diesel/branches{/branch}","tags_url":"https://api.github.com/repos/sgrif/diesel/tags","blobs_url":"https://api.github.com/repos/sgrif/diesel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sgrif/diesel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sgrif/diesel/git/refs{/sha}","trees_url":"https://api.github.com/repos/sgrif/diesel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sgrif/diesel/statuses/{sha}","languages_url":"https://api.github.com/repos/sgrif/diesel/languages","stargazers_url":"https://api.github.com/repos/sgrif/diesel/stargazers","contributors_url":"https://api.github.com/repos/sgrif/diesel/contributors","subscribers_url":"https://api.github.com/repos/sgrif/diesel/subscribers","subscription_url":"https://api.github.com/repos/sgrif/diesel/subscription","commits_url":"https://api.github.com/repos/sgrif/diesel/commits{/sha}","git_commits_url":"https://api.github.com/repos/sgrif/diesel/git/commits{/sha}","comments_url":"https://api.github.com/repos/sgrif/diesel/comments{/number}","issue_comment_url":"https://api.github.com/repos/sgrif/diesel/issues/comments{/number}","contents_url":"https://api.github.com/repos/sgrif/diesel/contents/{+path}","compare_url":"https://api.github.com/repos/sgrif/diesel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sgrif/diesel/merges","archive_url":"https://api.github.com/repos/sgrif/diesel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sgrif/diesel/downloads","issues_url":"https://api.github.com/repos/sgrif/diesel/issues{/number}","pulls_url":"https://api.github.com/repos/sgrif/diesel/pulls{/number}","milestones_url":"https://api.github.com/repos/sgrif/diesel/milestones{/number}","notifications_url":"https://api.github.com/repos/sgrif/diesel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sgrif/diesel/labels{/name}","releases_url":"https://api.github.com/repos/sgrif/diesel/releases{/id}","deployments_url":"https://api.github.com/repos/sgrif/diesel/deployments","created_at":"2015-08-29T22:51:00Z","updated_at":"2016-02-02T23:32:33Z","pushed_at":"2016-02-03T17:26:26Z","git_url":"git://github.com/sgrif/diesel.git","ssh_url":"git@github.com:sgrif/diesel.git","clone_url":"https://github.com/sgrif/diesel.git","svn_url":"https://github.com/sgrif/diesel","homepage":"","size":3334,"stargazers_count":444,"watchers_count":444,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":35,"mirror_url":null,"open_issues_count":38,"forks":35,"open_issues":38,"watchers":444,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sgrif/diesel/pulls/181"},"html":{"href":"https://github.com/sgrif/diesel/pull/181"},"issue":{"href":"https://api.github.com/repos/sgrif/diesel/issues/181"},"comments":{"href":"https://api.github.com/repos/sgrif/diesel/issues/181/comments"},"review_comments":{"href":"https://api.github.com/repos/sgrif/diesel/pulls/181/comments"},"review_comment":{"href":"https://api.github.com/repos/sgrif/diesel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sgrif/diesel/pulls/181/commits"},"statuses":{"href":"https://api.github.com/repos/sgrif/diesel/statuses/8fae5ffc16d0ee7ab8d51c7b5a6b5fda7163ef49"}}}}