Skip to content

Commit

Permalink
Deploying to gh-pages from @ eb78689 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
weiznich committed Sep 29, 2023
1 parent 6a7329b commit 99d3807
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion guides/getting-started.html
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ <h2 id="write-rust">Write Rust</h2>
A Note on <code>RETURNING</code> clauses
</header>
<div class="aside__text">
<p>Not all databases support <code>RETURNING</code> clauses. On backends that support the RETURNING clause (such as PostgreSQL and SQLite), we can get data back from our insert as well. On the SQLite backend, <a href="https://www.sqlite.org/lang_returning.html">RETURNING</a>{:target="_blank“} has been supported since version 3.35.0. To enable RETURNING clause add feature flag, <code>returning_clauses_for_sqlite_3_35</code>. MySQL does not support RETURNING clauses. To get back all of the inserted rows, we can call <code>.get_results</code> instead of <code>.execute</code>. If you follow this guide on a different database system be sure to checkout <a href="https://github.com/diesel-rs/diesel/tree/master/examples">the examples specific to your database system</a>{:target=”_blank"}.</p>
<p>Not all databases support <code>RETURNING</code> clauses. On backends that support the RETURNING clause (such as PostgreSQL and SQLite), we can get data back from our insert as well. On the SQLite backend, <a href="https://www.sqlite.org/lang_returning.html" target="_blank">RETURNING</a> has been supported since version 3.35.0. To enable RETURNING clause add feature flag, <code>returning_clauses_for_sqlite_3_35</code>. MySQL does not support RETURNING clauses. To get back all of the inserted rows, we can call <code>.get_results</code> instead of <code>.execute</code>. If you follow this guide on a different database system be sure to checkout <a href="https://github.com/diesel-rs/diesel/tree/master/examples" target="_blank">the examples specific to your database system</a>.</p>
</div>
</aside>
<p>Diesel can insert more than one record in a single query. Just pass a <code>Vec</code> or slice to <a href="https://docs.diesel.rs/2.1.x/diesel/fn.insert_into.html"><code>insert_into</code></a>, and then call <a href="https://docs.diesel.rs/2.1.x/diesel/prelude/trait.RunQueryDsl.html#method.get_results"><code>get_results</code></a> instead of <code>get_result</code>. If you don’t actually want to do anything with the row that was just inserted, call <a href="https://docs.diesel.rs/2.1.x/diesel/prelude/trait.RunQueryDsl.html#method.execute"><code>.execute</code></a> instead. The compiler won’t complain at you, that way. :)</p>
Expand Down

0 comments on commit 99d3807

Please sign in to comment.