'"the trait `SupportsReturningClause` is not implemented for `Sqlite`"

I'm trying to get the diesel crate to work with SQLite but going off the getting started guide, it does not seem to work for sqlite.

The code which does work with postgres but not sqlite

  diesel::insert_into(schema::subscriptions::table)
      .values(&new_subscription)
      .get_result(&connection)
      .expect("Error saving new subscription")

The error

error[E0277]: the trait bound `Sqlite: SupportsReturningClause` is not satisfied
  --> src/responder.rs:41:12
   |
41 |           .get_result(&connection)
   |            ^^^^^^^^^^ the trait `SupportsReturningClause` is not implemented for `Sqlite`

I can see some references in the documentation about returning clause for diesel but I'm not entirely sure what I should change this to for it to work.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source