Skip to content

Provide a implementation of diesel::connection::Connection as part of the connection type of this crate #890

Closed as not planned
@weiznich

Description

@weiznich

This is more a feature request/suggestion than a bug report.

As part of the diesel 2.0 release we reworked large parts of diesels internals, such that it should now be possible to provide a custom Connection implementation for the existing diesel postgres backend outside of the main crate. Your crate would be a good candidate for this as it already provides a pure rust postgres connection implementation. I expect that there would be a certain demand in having a pure rust connection implementation supported by diesel as well.

A diesel connection implementation would enable the usage of any supported diesel feature with a connection type from your crate. This includes all of the existing query DSL, all methods to load and map results to rust struct and even the existing migration infrastructure.

This would require implementing diesel::connection::Connection either directly for your connection type or indirectly via a wrapper type. Providing this implementation as part of your crate would enable a better integration with optimizations like prepared statement caching.

If you are interested in such feature I'm happy to provide guidance on writing the corresponding code. I might even be able to help writing parts of the implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions