{"action":"created","comment":{"url":"https://api.github.com/repos/diesel-rs/diesel/pulls/comments/157819070","pull_request_review_id":84517562,"id":157819070,"diff_hunk":"@@ -0,0 +1,445 @@\n+Most applications fall into a category called \"CRUD\" apps.\n+CRUD stands for \"Create, Read, Update, Delete\".\n+Diesel provides support for all four pieces,\n+but in this guide we're going to look at\n+all the different ways to go about creating `INSERT` statements.\n+\n+The examples for this guide are going to be shown for PostgreSQL,\n+but you can follow along with either backend.\n+The full code examples for all backends are linked at the bottom of this guide.\n+\n+An insert statement always starts with [`insert_into`].\n+The first argument to this function is the table you're inserting into.\n+\n+[`insert_into`]: //docs.diesel.rs/diesel/fn.insert_into.html\n+\n+For this guide, our schema will look like this:\n+\n+```\n+table! {\n+    users {\n+        id -> Integer,\n+        name -> Text,\n+        hair_color -> Nullable<Text>,\n+        created_at -> Timestamp,\n+        updated_at -> Timestamp,\n+    }\n+}\n+```\n+\n+Since our functions are going to only operate on the `users` table,\n+we can put `use schema::users::dsl::*;` at the top of our function,\n+which will let us write `insert_into(users)` instead of\n+`insert_into(users::table)`.\n+If you're importing `table::dsl::*`,\n+make sure it's always inside a function, not the top of your module.\n+\n+If all of the columns on a table have a default,\n+the simplest thing we can do is call [`.default_values`].\n+We could write a function that ran that query like this:\n+\n+[`.default_values`]: //docs.diesel.rs/diesel/query_builder/insert_statement/struct.IncompleteInsertStatement.html#method.default_values\n+\n+```\n+use schema::users::dsl::*;\n+\n+insert_into(users).default_values().execute(conn)\n+```\n+\n+It's worth noting that this code will still compile,\n+even if you don't have default values on all of your columns.\n+Diesel will ensure that the value you're assigning has the right type,\n+but it can't validate whether the column has a default,\n+any constraints that could fail,\n+or any triggers that could fire.\n+\n+We can use [`debug_query`] to inspect the generated SQL.\n+The exact SQL that is generated may differ depending on the backend you're using.\n+If we run `println!(\"{}\", debug_query::<Pg, _>(&our_query));`,\n+we'll see the following:\n+\n+[`debug_query`]: //docs.diesel.rs/diesel/fn.debug_query.html\n+\n+```\n+INSERT INTO \"users\" DEFAULT VALUES -- binds: []\n+```\n+\n+If we want to actually provide values, we can call [`.values`] instead.\n+There are a lot of different arguments we can provide here.\n+The simplest is a single column/value pair using [`.eq`].\n+\n+[`.values`]: //docs.diesel.rs/diesel/query_builder/insert_statement/struct.IncompleteInsertStatement.html#method.values\n+[`.eq`]: //docs.diesel.rs/diesel/expression_methods/trait.ExpressionMethods.html#method.eq\n+\n+```\n+use schema::users::dsl::*;\n+\n+insert_into(users).values(name.eq(\"Sean\")).execute(conn)\n+```\n+\n+This will generate the following SQL:\n+\n+```\n+INSERT INTO \"users\" (\"name\") VALUES ($1) -- binds [\"Sean\"]\n+```\n+\n+If we want to provide values for more than one column, we can pass a tuple.\n+\n+```\n+use schema::users::dsl::*;\n+\n+insert_into(users)\n+    .values((name.eq(\"Tess\"), hair_color.eq(\"Brown\")))\n+    .execute(conn)\n+```\n+\n+This will generate the following SQL:\n+\n+```\n+INSERT INTO \"users\" (\"name\", \"hair_color\")\n+VALUES ($1, $2) -- binds: [\"Tess\", \"Brown\"]\n+```\n+\n+## `Insertable`\n+\n+Working with tuples is the typical way to do an insert\n+if you just have some values that you want to stick in the database.\n+But what if your data is coming from another source,\n+like a web form deserialized by Serde?\n+It'd be annoying to have to write\n+`(name.eq(user.name), hair_color.eq(user.hair_color))`.\n+\n+Diesel provides the [`Insertable`] trait for this case.\n+`Insertable` maps your struct to columns in the database.\n+We can derive this automatically by adding `#[derive(Insertable)]` to our type.\n+\n+[`Insertable`]: //docs.diesel.rs/diesel/prelude/trait.Insertable.html\n+\n+```\n+use schema::users;\n+\n+#[derive(Deserialize, Insertable)]\n+#[table_name = \"users\"]\n+pub struct UserForm<'a> {\n+    name: &'a str,\n+    hair_color: Option<&'a str>,\n+}\n+```\n+\n+```\n+use schema::users::dsl::*;\n+\n+let json = r#\"{ \"name\": \"Sean\", \"hair_color\": \"Black\" }\"#;\n+let user_form = serde_json::from_str::<UserForm>(json)?;\n+\n+insert_into(users).values(&user_form).execute(conn)?;\n+\n+Ok(())\n+```\n+\n+This will generate the same SQL as if we had used a tuple.\n+\n+```\n+INSERT INTO \"users\" (\"name\", \"hair_color\")\n+VALUES ($1, $2) -- binds: [\"Sean\", \"Black\"]\n+```\n+\n+If one of the fields on our tuple is `None`,\n+the default value will be inserted for that field.\n+\n+```\n+use schema::users::dsl::*;\n+\n+let json = r#\"{ \"name\": \"Ruby\", \"hair_color\": null }\"#;\n+let user_form = serde_json::from_str::<UserForm>(json)?;\n+\n+insert_into(users).values(&user_form).execute(conn)?;\n+\n+Ok(())\n+```\n+\n+That will generate the following SQL:\n+\n+```\n+INSERT INTO \"users\" (\"name\", \"hair_color\")\n+VALUES ($1, DEFAULT) -- binds: [\"Ruby\"]\n+```\n+\n+## Batch Insert\n+\n+If we want to insert more than one row at a time,\n+we can do that by passing a `&Vec` or slice of any of the forms used above.\n+Keep in mind that you're always passing a reference here.\n+As of Diesel 1.0, Rust will generate a very opaque error message about\n+overflow if you try to pass `Vec` instead of `&Vec`.\n+\n+On backends that support the `DEFAULT` keyword (all backends except SQLite),\n+the data will be inserted in a single query.\n+On SQLite, one query will be performed per row.\n+\n+For example, if we wanted to insert two rows with a single value,\n+we can just use a `Vec`.\n+\n+```\n+use schema::users::dsl::*;\n+\n+insert_into(users)\n+    .values(&vec![name.eq(\"Sean\"), name.eq(\"Tess\")])\n+    .execute(conn)\n+```\n+\n+Which generates the following SQL:\n+\n+```\n+INSERT INTO \"users\" (\"name\") VALUES ($1), ($2) -- binds [\"Sean\", \"Tess\"]\n+```\n+\n+Note that on SQLite, you won't be able to use `debug_query` for this,\n+since it doesn't map to a single query.\n+You can inspect each row like this:\n+\n+```\n+for row in &values {\n+    let query = insert_into(users).values(row);\n+    println!(\"{}\", debug_query::<Sqlite, _>(&query));\n+}\n+```\n+\n+If we wanted to use `DEFAULT` for some of our rows,\n+we can use an option here.\n+\n+```\n+use schema::users::dsl::*;\n+\n+insert_into(users)\n+    .values(&vec![Some(name.eq(\"Sean\")), None])\n+    .execute(conn)\n+```\n+\n+Note that the type here is `Option<Eq<Column, Value>>` not `Eq<Column, Option<Value>>`.\n+Doing `column.eq(None)` would insert `NULL` not `DEFAULT`.\n+This generates the following SQL:\n+\n+```\n+INSERT INTO \"users\" (\"name\") VALUES ($1), (DEFAULT) -- binds [\"Sean\"]\n+```\n+\n+We can do the same thing with tuples.\n+\n+```\n+use schema::users::dsl::*;\n+\n+insert_into(users)\n+    .values(&vec![\n+        (name.eq(\"Sean\"), hair_color.eq(\"Black\")),\n+        (name.eq(\"Tess\"), hair_color.eq(\"Brown\")),\n+    ])\n+    .execute(conn)\n+```\n+\n+Which generates the following SQL:\n+\n+```\n+INSERT INTO \"users\" (\"name\", \"hair_color\") VALUES ($1, $2), ($3, $4)\n+-- binds: [\"Sean\", \"Black\", \"Tess\", \"Brown\"]\n+```\n+\n+Once again, we can use an `Option` for any of the fields to insert `DEFAULT`.\n+\n+```\n+use schema::users::dsl::*;\n+\n+insert_into(users)\n+    .values(&vec![\n+        (name.eq(\"Sean\"), Some(hair_color.eq(\"Black\"))),\n+        (name.eq(\"Ruby\"), None),\n+    ])\n+    .execute(conn)\n+```\n+\n+Which generates the following SQL:\n+\n+```\n+INSERT INTO \"users\" (\"name\", \"hair_color\") VALUES ($1, $2), ($3, DEFAULT)\n+-- binds: [\"Sean\", \"Black\", \"Ruby\"]\n+```\n+\n+Finally, `Insertable` structs can be used for batch insert as well.\n+\n+```\n+use schema::users::dsl::*;\n+\n+let json = r#\"[\n+    { \"name\": \"Sean\", \"hair_color\": \"Black\" },\n+    { \"name\": \"Tess\", \"hair_color\": \"Brown\" }\n+]\"#;\n+let user_form = serde_json::from_str::<Vec<UserForm>>(json)?;\n+\n+insert_into(users).values(&user_form).execute(conn)?;\n+\n+Ok(())\n+```\n+\n+This generates the same SQL as if we had used a tuple:\n+\n+```\n+INSERT INTO \"users\" (\"name\", \"hair_color\") VALUES ($1, $2), ($3, $4)\n+-- binds: [\"Sean\", \"Black\", \"Tess\", \"Brown\"]\n+```\n+\n+### The `RETURNING` Clause\n+\n+On backends that support the `RETURNING` clause (such as PostgreSQL),\n+we can get data back from our insert as well.\n+MySQL and SQLite do not support `RETURNING` clauses.\n+To get back all of the inserted rows,\n+we can call [`.get_results`] instead of [`.execute`].\n+\n+[`.get_results`]: //docs.diesel.rs/diesel/query_dsl/trait.RunQueryDsl.html#method.get_results\n+[`.get_result`]: //docs.diesel.rs/diesel/query_dsl/trait.RunQueryDsl.html#method.get_result\n+\n+Given this struct:\n+\n+```\n+#[derive(Queryable, PartialEq, Debug)]\n+struct User {\n+    id: i32,\n+    name: String,\n+    hair_color: Option<String>,\n+    created_at: SystemTime,\n+    updated_at: SystemTime,\n+}\n+```\n+\n+We can use `get_results` with this test:\n+\n+```\n+use diesel::select;\n+use schema::users::dsl::*;\n+\n+let now = select(diesel::dsl::now).get_result::<SystemTime>(&conn)?;\n+\n+let inserted_users = insert_into(users)\n+    .values(&vec![\n+        (id.eq(1), name.eq(\"Sean\")),\n+        (id.eq(2), name.eq(\"Tess\")),\n+    ])\n+    .get_results(&conn)?;\n+\n+let expected_users = vec![\n+    User {\n+        id: 1,\n+        name: \"Sean\".into(),\n+        hair_color: None,\n+        created_at: now,\n+        updated_at: now,\n+    },\n+    User {\n+        id: 2,\n+        name: \"Tess\".into(),\n+        hair_color: None,\n+        created_at: now,\n+        updated_at: now,\n+    },\n+];\n+assert_eq!(expected_users, inserted_users);\n+```\n+\n+To inspect the SQL generated by `.get_results` or `.get_result`,\n+we will need to call `.as_query` before passing it to `debug_query`.\n+The query in the last test generates the following SQL:\n+\n+```\n+INSERT INTO \"users\" (\"id\", \"name\") VALUES ($1, $2), ($3, $4)\n+RETURNING \"users\".\"id\", \"users\".\"name\", \"users\".\"hair_color\",\n+          \"users\".\"created_at\", \"users\".\"updated_at\"\n+-- binds: [1, \"Sean\", 2, \"Tess\"]\n+```\n+\n+You'll notice that we've never given an explicit value for `created_at` and\n+`updated_at` in any of our examples.\n+With Diesel, you typically won't set those values in Rust.\n+Typically these columns get set with `DEFAULT CURRENT_TIMESTAMP`,\n+and a trigger is used to change `updated_at` on updates.\n+If you're using PostgreSQL, you can use a built-in trigger\n+by running `SELECT diesel_manage_updated_at('users');` in a migration.\n+\n+If we expect one row instead of multiple, we can call `.get_result` instead of\n+`.get_results`.\n+\n+```\n+use diesel::select;\n+use schema::users::dsl::*;\n+\n+let now = select(diesel::dsl::now).get_result::<SystemTime>(&conn)?;\n+\n+let inserted_user = insert_into(users)\n+    .values((id.eq(3), name.eq(\"Ruby\")))\n+    .get_result(&conn)?;\n+\n+let expected_user = User {\n+    id: 3,\n+    name: \"Ruby\".into(),\n+    hair_color: None,\n+    created_at: now,\n+    updated_at: now,\n+};\n+assert_eq!(expected_user, inserted_user);\n+```\n+\n+This generates the same SQL as `get_results`:\n+\n+```\n+INSERT INTO \"users\" (\"id\", \"name\") VALUES ($1, $2)\n+RETURNING \"users\".\"id\", \"users\".\"name\", \"users\".\"hair_color\",\n+          \"users\".\"created_at\", \"users\".\"updated_at\"\n+-- binds: [3, \"Ruby\"]\n+```\n+\n+Finally, if we only want a single column back, we can call `.returning` explicitly.\n+This code would return the inserted ID:\n+\n+```\n+use schema::users::dsl::*;\n+\n+insert_into(users)\n+    .values(name.eq(\"Ruby\"))\n+    .returning(id)\n+    .get_result(conn)\n+```\n+\n+Which generates the following SQL:\n+\n+```\n+INSERT INTO \"users\" (\"name\") VALUES ($1) RETURNING \"users\".\"id\"\n+-- binds: [\"Ruby\"]\n+```\n+\n+### \"Upsert\"\n+\n+Every type of insert statement covered in this guide can also be used for\n+\"insert or update\" queries, also known as \"upsert\".\n+The specifics of upsert are covered extensively in the API documentation.\n+\n+For PostgreSQL, see the [`pg::upsert`] module.\n+For MySQL and SQLite, upsert is done via `REPLACE`.\n+See [`replace_into`] for details.\n+\n+Diesel does not have support for MySQL's `ON DUPLICATE KEY` conflict,\n+as its results are non-deterministic, and unsafe with replication.\n+\n+[`pg::upsert`]: //docs.diesel.rs/diesel/pg/upsert/index.html\n+[`replace_into`]: //docs.diesel.rs/diesel/fn.replace_into.html\n+\n+### Conclusion\n+\n+While there are a lot of examples in this guide,\n+ultimately the only difference between various kinds of insert statements\n+is the argument passed to `.values`.\n+\n+All examples in this guide are run as part of Diesel's test suite.\n+You can find the full code examples for each backend at these links:\n+\n+- [`PostgreSQL`]\n+- [`MySQL`]\n+- [`SQLite`]","path":"guide_drafts/all-about-insert.md","position":445,"original_position":445,"commit_id":"02014390337e448b03fa127fb1772dce1b8ef28b","original_commit_id":"02014390337e448b03fa127fb1772dce1b8ef28b","user":{"login":"killercup","id":20063,"avatar_url":"https://avatars1.githubusercontent.com/u/20063?v=4","gravatar_id":"","url":"https://api.github.com/users/killercup","html_url":"https://github.com/killercup","followers_url":"https://api.github.com/users/killercup/followers","following_url":"https://api.github.com/users/killercup/following{/other_user}","gists_url":"https://api.github.com/users/killercup/gists{/gist_id}","starred_url":"https://api.github.com/users/killercup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/killercup/subscriptions","organizations_url":"https://api.github.com/users/killercup/orgs","repos_url":"https://api.github.com/users/killercup/repos","events_url":"https://api.github.com/users/killercup/events{/privacy}","received_events_url":"https://api.github.com/users/killercup/received_events","type":"User","site_admin":false},"body":"(This comment is just so we can see this **TODO** in the review.)","created_at":"2017-12-19T17:17:45Z","updated_at":"2017-12-19T17:17:48Z","html_url":"https://github.com/diesel-rs/diesel/pull/1405#discussion_r157819070","pull_request_url":"https://api.github.com/repos/diesel-rs/diesel/pulls/1405","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/diesel-rs/diesel/pulls/comments/157819070"},"html":{"href":"https://github.com/diesel-rs/diesel/pull/1405#discussion_r157819070"},"pull_request":{"href":"https://api.github.com/repos/diesel-rs/diesel/pulls/1405"}}},"pull_request":{"url":"https://api.github.com/repos/diesel-rs/diesel/pulls/1405","id":158755164,"html_url":"https://github.com/diesel-rs/diesel/pull/1405","diff_url":"https://github.com/diesel-rs/diesel/pull/1405.diff","patch_url":"https://github.com/diesel-rs/diesel/pull/1405.patch","issue_url":"https://api.github.com/repos/diesel-rs/diesel/issues/1405","number":1405,"state":"open","locked":false,"title":"First draft of an INSERT guide","user":{"login":"sgrif","id":1529387,"avatar_url":"https://avatars2.githubusercontent.com/u/1529387?v=4","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":"This guide mirrors the form of \"All About Updates\", but covers the\r\nvarious ways to use `insert_into`.\r\n\r\nI opted not to cover upsert in depth, as really PG upsert should have\r\nits own guide if we feel that is useful to have. The API docs are really\r\ncomprehensive for upsert, so I think just linking to the docs is fine\r\nfor now.\r\n\r\nRight now I only included code examples for PG, I'll port that to the\r\nother backends once the guide is ready to be published.","created_at":"2017-12-16T18:31:02Z","updated_at":"2017-12-19T17:17:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d3ef7718b87e20117f992eb535d4e717308c8f6c","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/diesel-rs/diesel/pulls/1405/commits","review_comments_url":"https://api.github.com/repos/diesel-rs/diesel/pulls/1405/comments","review_comment_url":"https://api.github.com/repos/diesel-rs/diesel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/diesel-rs/diesel/issues/1405/comments","statuses_url":"https://api.github.com/repos/diesel-rs/diesel/statuses/02014390337e448b03fa127fb1772dce1b8ef28b","head":{"label":"diesel-rs:sg-insert-guide","ref":"sg-insert-guide","sha":"02014390337e448b03fa127fb1772dce1b8ef28b","user":{"login":"diesel-rs","id":16763251,"avatar_url":"https://avatars2.githubusercontent.com/u/16763251?v=4","gravatar_id":"","url":"https://api.github.com/users/diesel-rs","html_url":"https://github.com/diesel-rs","followers_url":"https://api.github.com/users/diesel-rs/followers","following_url":"https://api.github.com/users/diesel-rs/following{/other_user}","gists_url":"https://api.github.com/users/diesel-rs/gists{/gist_id}","starred_url":"https://api.github.com/users/diesel-rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diesel-rs/subscriptions","organizations_url":"https://api.github.com/users/diesel-rs/orgs","repos_url":"https://api.github.com/users/diesel-rs/repos","events_url":"https://api.github.com/users/diesel-rs/events{/privacy}","received_events_url":"https://api.github.com/users/diesel-rs/received_events","type":"Organization","site_admin":false},"repo":{"id":41609775,"name":"diesel","full_name":"diesel-rs/diesel","owner":{"login":"diesel-rs","id":16763251,"avatar_url":"https://avatars2.githubusercontent.com/u/16763251?v=4","gravatar_id":"","url":"https://api.github.com/users/diesel-rs","html_url":"https://github.com/diesel-rs","followers_url":"https://api.github.com/users/diesel-rs/followers","following_url":"https://api.github.com/users/diesel-rs/following{/other_user}","gists_url":"https://api.github.com/users/diesel-rs/gists{/gist_id}","starred_url":"https://api.github.com/users/diesel-rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diesel-rs/subscriptions","organizations_url":"https://api.github.com/users/diesel-rs/orgs","repos_url":"https://api.github.com/users/diesel-rs/repos","events_url":"https://api.github.com/users/diesel-rs/events{/privacy}","received_events_url":"https://api.github.com/users/diesel-rs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/diesel-rs/diesel","description":"A safe, extensible ORM and Query Builder for Rust","fork":false,"url":"https://api.github.com/repos/diesel-rs/diesel","forks_url":"https://api.github.com/repos/diesel-rs/diesel/forks","keys_url":"https://api.github.com/repos/diesel-rs/diesel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/diesel-rs/diesel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/diesel-rs/diesel/teams","hooks_url":"https://api.github.com/repos/diesel-rs/diesel/hooks","issue_events_url":"https://api.github.com/repos/diesel-rs/diesel/issues/events{/number}","events_url":"https://api.github.com/repos/diesel-rs/diesel/events","assignees_url":"https://api.github.com/repos/diesel-rs/diesel/assignees{/user}","branches_url":"https://api.github.com/repos/diesel-rs/diesel/branches{/branch}","tags_url":"https://api.github.com/repos/diesel-rs/diesel/tags","blobs_url":"https://api.github.com/repos/diesel-rs/diesel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/diesel-rs/diesel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/diesel-rs/diesel/git/refs{/sha}","trees_url":"https://api.github.com/repos/diesel-rs/diesel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/diesel-rs/diesel/statuses/{sha}","languages_url":"https://api.github.com/repos/diesel-rs/diesel/languages","stargazers_url":"https://api.github.com/repos/diesel-rs/diesel/stargazers","contributors_url":"https://api.github.com/repos/diesel-rs/diesel/contributors","subscribers_url":"https://api.github.com/repos/diesel-rs/diesel/subscribers","subscription_url":"https://api.github.com/repos/diesel-rs/diesel/subscription","commits_url":"https://api.github.com/repos/diesel-rs/diesel/commits{/sha}","git_commits_url":"https://api.github.com/repos/diesel-rs/diesel/git/commits{/sha}","comments_url":"https://api.github.com/repos/diesel-rs/diesel/comments{/number}","issue_comment_url":"https://api.github.com/repos/diesel-rs/diesel/issues/comments{/number}","contents_url":"https://api.github.com/repos/diesel-rs/diesel/contents/{+path}","compare_url":"https://api.github.com/repos/diesel-rs/diesel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/diesel-rs/diesel/merges","archive_url":"https://api.github.com/repos/diesel-rs/diesel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/diesel-rs/diesel/downloads","issues_url":"https://api.github.com/repos/diesel-rs/diesel/issues{/number}","pulls_url":"https://api.github.com/repos/diesel-rs/diesel/pulls{/number}","milestones_url":"https://api.github.com/repos/diesel-rs/diesel/milestones{/number}","notifications_url":"https://api.github.com/repos/diesel-rs/diesel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/diesel-rs/diesel/labels{/name}","releases_url":"https://api.github.com/repos/diesel-rs/diesel/releases{/id}","deployments_url":"https://api.github.com/repos/diesel-rs/diesel/deployments","created_at":"2015-08-29T22:51:00Z","updated_at":"2017-12-19T00:10:28Z","pushed_at":"2017-12-19T13:27:49Z","git_url":"git://github.com/diesel-rs/diesel.git","ssh_url":"git@github.com:diesel-rs/diesel.git","clone_url":"https://github.com/diesel-rs/diesel.git","svn_url":"https://github.com/diesel-rs/diesel","homepage":"http://diesel.rs","size":13593,"stargazers_count":2139,"watchers_count":2139,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":202,"mirror_url":null,"archived":false,"open_issues_count":112,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":202,"open_issues":112,"watchers":2139,"default_branch":"master"}},"base":{"label":"diesel-rs:master","ref":"master","sha":"278556bb0fc0bb6a43f18665e8a770c5a6250dc5","user":{"login":"diesel-rs","id":16763251,"avatar_url":"https://avatars2.githubusercontent.com/u/16763251?v=4","gravatar_id":"","url":"https://api.github.com/users/diesel-rs","html_url":"https://github.com/diesel-rs","followers_url":"https://api.github.com/users/diesel-rs/followers","following_url":"https://api.github.com/users/diesel-rs/following{/other_user}","gists_url":"https://api.github.com/users/diesel-rs/gists{/gist_id}","starred_url":"https://api.github.com/users/diesel-rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diesel-rs/subscriptions","organizations_url":"https://api.github.com/users/diesel-rs/orgs","repos_url":"https://api.github.com/users/diesel-rs/repos","events_url":"https://api.github.com/users/diesel-rs/events{/privacy}","received_events_url":"https://api.github.com/users/diesel-rs/received_events","type":"Organization","site_admin":false},"repo":{"id":41609775,"name":"diesel","full_name":"diesel-rs/diesel","owner":{"login":"diesel-rs","id":16763251,"avatar_url":"https://avatars2.githubusercontent.com/u/16763251?v=4","gravatar_id":"","url":"https://api.github.com/users/diesel-rs","html_url":"https://github.com/diesel-rs","followers_url":"https://api.github.com/users/diesel-rs/followers","following_url":"https://api.github.com/users/diesel-rs/following{/other_user}","gists_url":"https://api.github.com/users/diesel-rs/gists{/gist_id}","starred_url":"https://api.github.com/users/diesel-rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diesel-rs/subscriptions","organizations_url":"https://api.github.com/users/diesel-rs/orgs","repos_url":"https://api.github.com/users/diesel-rs/repos","events_url":"https://api.github.com/users/diesel-rs/events{/privacy}","received_events_url":"https://api.github.com/users/diesel-rs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/diesel-rs/diesel","description":"A safe, extensible ORM and Query Builder for Rust","fork":false,"url":"https://api.github.com/repos/diesel-rs/diesel","forks_url":"https://api.github.com/repos/diesel-rs/diesel/forks","keys_url":"https://api.github.com/repos/diesel-rs/diesel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/diesel-rs/diesel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/diesel-rs/diesel/teams","hooks_url":"https://api.github.com/repos/diesel-rs/diesel/hooks","issue_events_url":"https://api.github.com/repos/diesel-rs/diesel/issues/events{/number}","events_url":"https://api.github.com/repos/diesel-rs/diesel/events","assignees_url":"https://api.github.com/repos/diesel-rs/diesel/assignees{/user}","branches_url":"https://api.github.com/repos/diesel-rs/diesel/branches{/branch}","tags_url":"https://api.github.com/repos/diesel-rs/diesel/tags","blobs_url":"https://api.github.com/repos/diesel-rs/diesel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/diesel-rs/diesel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/diesel-rs/diesel/git/refs{/sha}","trees_url":"https://api.github.com/repos/diesel-rs/diesel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/diesel-rs/diesel/statuses/{sha}","languages_url":"https://api.github.com/repos/diesel-rs/diesel/languages","stargazers_url":"https://api.github.com/repos/diesel-rs/diesel/stargazers","contributors_url":"https://api.github.com/repos/diesel-rs/diesel/contributors","subscribers_url":"https://api.github.com/repos/diesel-rs/diesel/subscribers","subscription_url":"https://api.github.com/repos/diesel-rs/diesel/subscription","commits_url":"https://api.github.com/repos/diesel-rs/diesel/commits{/sha}","git_commits_url":"https://api.github.com/repos/diesel-rs/diesel/git/commits{/sha}","comments_url":"https://api.github.com/repos/diesel-rs/diesel/comments{/number}","issue_comment_url":"https://api.github.com/repos/diesel-rs/diesel/issues/comments{/number}","contents_url":"https://api.github.com/repos/diesel-rs/diesel/contents/{+path}","compare_url":"https://api.github.com/repos/diesel-rs/diesel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/diesel-rs/diesel/merges","archive_url":"https://api.github.com/repos/diesel-rs/diesel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/diesel-rs/diesel/downloads","issues_url":"https://api.github.com/repos/diesel-rs/diesel/issues{/number}","pulls_url":"https://api.github.com/repos/diesel-rs/diesel/pulls{/number}","milestones_url":"https://api.github.com/repos/diesel-rs/diesel/milestones{/number}","notifications_url":"https://api.github.com/repos/diesel-rs/diesel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/diesel-rs/diesel/labels{/name}","releases_url":"https://api.github.com/repos/diesel-rs/diesel/releases{/id}","deployments_url":"https://api.github.com/repos/diesel-rs/diesel/deployments","created_at":"2015-08-29T22:51:00Z","updated_at":"2017-12-19T00:10:28Z","pushed_at":"2017-12-19T13:27:49Z","git_url":"git://github.com/diesel-rs/diesel.git","ssh_url":"git@github.com:diesel-rs/diesel.git","clone_url":"https://github.com/diesel-rs/diesel.git","svn_url":"https://github.com/diesel-rs/diesel","homepage":"http://diesel.rs","size":13593,"stargazers_count":2139,"watchers_count":2139,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":202,"mirror_url":null,"archived":false,"open_issues_count":112,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":202,"open_issues":112,"watchers":2139,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/diesel-rs/diesel/pulls/1405"},"html":{"href":"https://github.com/diesel-rs/diesel/pull/1405"},"issue":{"href":"https://api.github.com/repos/diesel-rs/diesel/issues/1405"},"comments":{"href":"https://api.github.com/repos/diesel-rs/diesel/issues/1405/comments"},"review_comments":{"href":"https://api.github.com/repos/diesel-rs/diesel/pulls/1405/comments"},"review_comment":{"href":"https://api.github.com/repos/diesel-rs/diesel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/diesel-rs/diesel/pulls/1405/commits"},"statuses":{"href":"https://api.github.com/repos/diesel-rs/diesel/statuses/02014390337e448b03fa127fb1772dce1b8ef28b"}},"author_association":"OWNER"}}
{"actor":{"display_login":"killercup"}}