# Custom backend implementations

**URL:** https://discourse.diesel.rs/t/custom-backend-implementations/37
**Category:** Diesel 2.0
**Created:** [July 6, 2018, 10:52pm UTC](https://discourse.diesel.rs/t/custom-backend-implementations/37 "2018-07-06T22:52:21Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![weiznich](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.diesel.rs/weiznich/32/64_2.png) [@weiznich](https://discourse.diesel.rs/u/weiznich)
#### Post date: [July 6, 2018, 10:52pm UTC](https://discourse.diesel.rs/t/custom-backend-implementations/37/1 "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 of diesel itself, as long as it meets the following points:

- Insert syntax is equivalent to postgresql, because otherwise the will be no implementation of `InsertValues for ColumnInsertValue`. Currently there are the following implementations inside of diesel:

- It is not possible to add support for some backend specific operations implemented in diesel itself. This basically boils down to that it is not possible to implement `Queryable<Oracle>` for something that exists inside in diesel. In consequence this means only the common subset of sql supported by all backend (== those things with an wild card impl inside of diesel) could be supported from the outside. Again this will be solved by [Re-Rebalancing Coherence](https://github.com/rust-lang/rfcs/pull/2451) RFC.

- The current migration mechanism [hardcodes the sql](https://github.com/diesel-rs/diesel/blob/master/diesel_migrations/migrations_internals/src/lib.rs#L260-L262) used to create the migration table. This assumes that it is possible to write create table statement that works on all backends. At least the current implementation does not work for the oracle backend. Most likely it is not possible to write a common create statement any more. This could be solved by making the create table statement somehow part of the connection implementation. See [this PR](https://github.com/diesel-rs/diesel/pull/1676) for a possible implementation. A other variant would be to add the create table statement directly to the connection trait.

(To be continued as the oracle backend matures)
