# Diesel 2.0

**URL:** https://discourse.diesel.rs/c/diesel-2-0/5.md

[Latest](https://discourse.diesel.rs/latest.md) · [Categories](https://discourse.diesel.rs/categories.md)

---

## [Diesel 2.0 -- Timing and communication](https://discourse.diesel.rs/t/diesel-2-0-timing-and-communication/14)

<div class="topic-metadata">

**Author:** [@sean](https://discourse.diesel.rs/u/sean)\
**Replies:** 1\
**Last updated:** [June 4, 2020, 11:54am UTC](https://discourse.diesel.rs/t/diesel-2-0-timing-and-communication/14 "2020-06-04T11:54:33Z")

</div>

There’s enough cruft that is blocked on a major version bump that I think we should start discussing how we handle 2.0. I think it’s important that we treat this as we would any other version. No breaking change we make…

---

## [Diesel 2.0 -- What goes here?](https://discourse.diesel.rs/t/diesel-2-0-what-goes-here/11)

<div class="topic-metadata">

**Author:** [@sean](https://discourse.diesel.rs/u/sean)\
**Replies:** 0\
**Last updated:** [June 7, 2018, 8:20pm UTC](https://discourse.diesel.rs/t/diesel-2-0-what-goes-here/11 "2018-06-07T20:20:17Z")

</div>

This category is the place to discuss what changes should land in Diesel 2.0, the timing of that version, and how we communicate it. See the second pinned thread for the discussion around timing and messaging. To propose…

---

## [Trying to make dynamic filtering work on Diesel 2.0](https://discourse.diesel.rs/t/trying-to-make-dynamic-filtering-work-on-diesel-2-0/188)

<div class="topic-metadata">

**Author:** [@Razican](https://discourse.diesel.rs/u/Razican)\
**Replies:** 4\
**Last updated:** [September 28, 2020, 12:38pm UTC](https://discourse.diesel.rs/t/trying-to-make-dynamic-filtering-work-on-diesel-2-0/188 "2020-09-28T12:38:44Z")

</div>

Hello! This is related to this topic, but since things have changed since then, I think it’s best to start a new topic. I have the following code, that was working fine, but latest changes for Diesel 2.0 have made it f…

---

## [Larger Inner Join with Junction Tables](https://discourse.diesel.rs/t/larger-inner-join-with-junction-tables/175)

<div class="topic-metadata">

**Author:** [@marius95](https://discourse.diesel.rs/u/marius95)\
**Replies:** 12\
**Last updated:** [August 4, 2020, 3:08pm UTC](https://discourse.diesel.rs/t/larger-inner-join-with-junction-tables/175 "2020-08-04T15:08:45Z")

</div>

Hello everyone, I’m quite new and currently I’m facing a problem. It’s the last step for my MVP. I don’t know how to properly join my tables and it’s driving me crazy. I’m tackling this problem since 8 hours and hopefu…

---

## [Generalize insert of new rows](https://discourse.diesel.rs/t/generalize-insert-of-new-rows/167)

<div class="topic-metadata">

**Author:** [@gas](https://discourse.diesel.rs/u/gas)\
**Replies:** 1\
**Last updated:** [August 3, 2020, 10:15am UTC](https://discourse.diesel.rs/t/generalize-insert-of-new-rows/167 "2020-08-03T10:15:05Z")

</div>

I have following snippet where I want to remove duplicate code as both blocks do basically the same. Do you have any idea how to create a single function which can be called instead of those two blocks? As use imports ar…

---

## [Issue in generated \`schema.rs\` when calling columns \`type\`](https://discourse.diesel.rs/t/issue-in-generated-schema-rs-when-calling-columns-type/173)

<div class="topic-metadata">

**Author:** [@gas](https://discourse.diesel.rs/u/gas)\
**Replies:** 1\
**Last updated:** [August 3, 2020, 10:13am UTC](https://discourse.diesel.rs/t/issue-in-generated-schema-rs-when-calling-columns-type/173 "2020-08-03T10:13:42Z")

</div>

When a column called type is used to contain foreign keys the schema.rs will contain joinable!(table\_having\_type\_as\_foreign\_key -\> types (type)); although it should be joinable!(table\_having\_type\_as\_foreign\_key -\> types …

---

## [Windows diesel link issue sqlite - only with cargo test](https://discourse.diesel.rs/t/windows-diesel-link-issue-sqlite-only-with-cargo-test/160)

<div class="topic-metadata">

**Author:** [@ta32](https://discourse.diesel.rs/u/ta32)\
**Replies:** 1\
**Last updated:** [July 22, 2020, 2:21pm UTC](https://discourse.diesel.rs/t/windows-diesel-link-issue-sqlite-only-with-cargo-test/160 "2020-07-22T14:21:19Z")

</div>

Hi I created a sample project https://github.com/ta32/issues/tree/master/clion\_sqlite\_build I installed cargo install diesel\_cli --no-default-features --features “sqlite-bundled” The project builds fine with cargo bui…

---

## [Use sql\_function in a changeset](https://discourse.diesel.rs/t/use-sql-function-in-a-changeset/144)

<div class="topic-metadata">

**Author:** [@jdrouet](https://discourse.diesel.rs/u/jdrouet)\
**Replies:** 5\
**Last updated:** [April 16, 2020, 8:24am UTC](https://discourse.diesel.rs/t/use-sql-function-in-a-changeset/144 "2020-04-16T08:24:07Z")

</div>

Hi! I’m trying to update a uuid in an object by using a sql\_function!(fn uuid\_generate\_v4() -\> Uuid); Is there a way to combine that with a changeset? #\[derive(AsChangeset, Debug, Deserialize, Serialize)\] #\[table\_name…

---

## [Generating the up.sql and down.sql files](https://discourse.diesel.rs/t/generating-the-up-sql-and-down-sql-files/132)

<div class="topic-metadata">

**Author:** [@dns2utf8](https://discourse.diesel.rs/u/dns2utf8)\
**Replies:** 1\
**Last updated:** [December 17, 2019, 5:02pm UTC](https://discourse.diesel.rs/t/generating-the-up-sql-and-down-sql-files/132 "2019-12-17T17:02:36Z")

</div>

Hi all Currently the cli generates files containing nothing but a comment: diesel migration generate create\_reports\_table --format sql Is there a plan for generating the actual sql? Maybe just in simple cases? Best, …

---

## [Is it possible to generate the model at tun time?](https://discourse.diesel.rs/t/is-it-possible-to-generate-the-model-at-tun-time/129)

<div class="topic-metadata">

**Author:** [@dorfsmay](https://discourse.diesel.rs/u/dorfsmay)\
**Replies:** 1\
**Last updated:** [November 25, 2019, 10:37pm UTC](https://discourse.diesel.rs/t/is-it-possible-to-generate-the-model-at-tun-time/129 "2019-11-25T22:37:25Z")

</div>

I have an applications that need to generate or modify the model at run time. Is this possible to do with Diesel? From a cursory looks, it looks like the apps will have to be re-compiled every time the model is changed…

---

## [Create a table using a schema](https://discourse.diesel.rs/t/create-a-table-using-a-schema/124)

<div class="topic-metadata">

**Author:** [@NotGate](https://discourse.diesel.rs/u/NotGate)\
**Replies:** 1\
**Last updated:** [November 1, 2019, 9:38am UTC](https://discourse.diesel.rs/t/create-a-table-using-a-schema/124 "2019-11-01T09:38:50Z")

</div>

I have a functioning database that I want to add and remove tables from programmatically. This was easy to do in Python using the records library but I can’t figure it out in Rust using diesel. I can do drop table users …

---

## [Build against master branch](https://discourse.diesel.rs/t/build-against-master-branch/116)

<div class="topic-metadata">

**Author:** [@thomasantony](https://discourse.diesel.rs/u/thomasantony)\
**Replies:** 0\
**Last updated:** [October 4, 2019, 6:08pm UTC](https://discourse.diesel.rs/t/build-against-master-branch/116 "2019-10-04T18:08:40Z")

</div>

I am trying to use the updated libsqlite-sys crate that is in the master branch on the git repo. I have updated my Cargo.toml to this: diesel = { path = "../diesel/diesel", features = \["sqlite", "numeric", "chrono"\] } d…

---

## [Please improve the API of embedded migrations](https://discourse.diesel.rs/t/please-improve-the-api-of-embedded-migrations/74)

<div class="topic-metadata">

**Author:** [@Boscop](https://discourse.diesel.rs/u/Boscop)\
**Replies:** 0\
**Last updated:** [March 11, 2019, 10:13pm UTC](https://discourse.diesel.rs/t/please-improve-the-api-of-embedded-migrations/74 "2019-03-11T22:13:20Z")

</div>

The current API for embedded migrations is not sufficient for our needs: Our multi-tenant project embeds two sets of migration files via the embed\_migrations macro: global migrations (for the global database) org migr…

---

## [Proposed Change: Add Send bound to Boxed query types](https://discourse.diesel.rs/t/proposed-change-add-send-bound-to-boxed-query-types/67)

<div class="topic-metadata">

**Author:** [@mehcode](https://discourse.diesel.rs/u/mehcode)\
**Replies:** 0\
**Last updated:** [March 8, 2019, 6:46am UTC](https://discourse.diesel.rs/t/proposed-change-add-send-bound-to-boxed-query-types/67 "2019-03-08T06:46:17Z")

</div>

Description of the change BoxedSelectStatement and BoxedWhereClause are now Send. Why is this needed? I’d like to enable the following API (from actix-diesel): let results = await!(users::table.load\_async(&state.db))?;…

---

## [Proposed Change: Add unsigned types to MysqlType](https://discourse.diesel.rs/t/proposed-change-add-unsigned-types-to-mysqltype/66)

<div class="topic-metadata">

**Author:** [@sean](https://discourse.diesel.rs/u/sean)\
**Replies:** 0\
**Last updated:** [February 17, 2019, 3:57pm UTC](https://discourse.diesel.rs/t/proposed-change-add-unsigned-types-to-mysqltype/66 "2019-02-17T15:57:55Z")

</div>

Description of the change Unsigned variants of all numeric types have been added to MysqlType. Why is this needed? We released Diesel 1.0 with completely broken support for unsigned types in MySQL. There’s an unsigned f…

---

## [Proposed change: Replace \`NonAggregate\` with something less broken that can support \`GROUP BY\`](https://discourse.diesel.rs/t/proposed-change-replace-nonaggregate-with-something-less-broken-that-can-support-group-by/18)

<div class="topic-metadata">

**Author:** [@sean](https://discourse.diesel.rs/u/sean)\
**Replies:** 5\
**Last updated:** [February 17, 2019, 1:01pm UTC](https://discourse.diesel.rs/t/proposed-change-replace-nonaggregate-with-something-less-broken-that-can-support-group-by/18 "2019-02-17T13:01:22Z")

</div>

A few notes: This has actually been fully implemented, see https://github.com/diesel-rs/diesel/tree/sg-group-by for the actual code. Replace () with NoGroupByClause to see how it relates to GROUP BY support. This propos…

---

## [Roadmap for diesel 2.0](https://discourse.diesel.rs/t/roadmap-for-diesel-2-0/62)

<div class="topic-metadata">

**Author:** [@weiznich](https://discourse.diesel.rs/u/weiznich)\
**Replies:** 0\
**Last updated:** [February 1, 2019, 10:09pm UTC](https://discourse.diesel.rs/t/roadmap-for-diesel-2-0/62 "2019-02-01T22:09:16Z")

</div>

Roadmap for diesel 2.0 Allow macro imports (There is already this PR, that needs a decision about how we want to structure our docs) Fix missing parts in our query dsl, notably: Adding proper GROUP BY support (experime…

---

## [Proposed change: Use an opaque struct instead of \`\[u8\]\` for \`Mysql::RawValue\` and \`Pg::RawValue\`](https://discourse.diesel.rs/t/proposed-change-use-an-opaque-struct-instead-of-u8-for-mysql-rawvalue-and-pg-rawvalue/15)

<div class="topic-metadata">

**Author:** [@sean](https://discourse.diesel.rs/u/sean)\
**Replies:** 2\
**Last updated:** [September 4, 2018, 12:35am UTC](https://discourse.diesel.rs/t/proposed-change-use-an-opaque-struct-instead-of-u8-for-mysql-rawvalue-and-pg-rawvalue/15 "2018-09-04T00:35:57Z")

</div>

Description of the change \<Mysql as Backend\>::RawValue has been changed from \[u8\] to MysqlValue. You can access the underlying bytes by calling .bytes() or .as\_ref(). \<Pg as Backend\>::RawValue has been changed from \[u…

---

## [Proposed Change: Allow expressions in limit/offset on PG](https://discourse.diesel.rs/t/proposed-change-allow-expressions-in-limit-offset-on-pg/38)

<div class="topic-metadata">

**Author:** [@sean](https://discourse.diesel.rs/u/sean)\
**Replies:** 2\
**Last updated:** [August 9, 2018, 2:59pm UTC](https://discourse.diesel.rs/t/proposed-change-allow-expressions-in-limit-offset-on-pg/38 "2018-08-09T14:59:25Z")

</div>

Description of the change .limit and .offset can now accept any valid Diesel expression, not just i64. This can only be used with the PostgreSQL backend, MySQL and SQLite continue to only accept i64 values. Why is this …

---

## [Custom backend implementations](https://discourse.diesel.rs/t/custom-backend-implementations/37)

<div class="topic-metadata">

**Author:** [@weiznich](https://discourse.diesel.rs/u/weiznich)\
**Replies:** 0\
**Last updated:** [July 6, 2018, 10:52pm UTC](https://discourse.diesel.rs/t/custom-backend-implementations/37 "2018-07-06T22:52:21Z")

</div>

This is a short mind dump about custom backend implementations outside of diesel. Also this summerize the state of the oracle backend. Given the current state of diesel it is possible to implement a new backend outside …
