Make Grouped
(and other such query structs) available with feature "i-implement-a-third-party-backend-and-opt-into-breaking-changes"
#4635
Replies: 1 comment 1 reply
-
It's not required to make any of these types public. Diesel exposes helper types via the
It's certainly possible to do that, but I advice you to not do that as you run into nasty generic clauses soon. You likely want to use the
That already exists: diesel/diesel/src/query_builder/mod.rs Lines 80 to 82 in 116e868 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
At the time of writing, structs like:
Grouped
Eq
And
SelectBy
Bound
are
pub
within their own module, but then the modules are generally imported aspub(crate)
, with some of these modules being made public only under the feature flag"i-implement-a-third-party-backend-and-opt-into-breaking-changes"
.I need these structs to be public to be able to write a where constraint that allows me to define that a certain query statement implements
LoadQuery
with a generic connection type, which in my own use case means using sqlite in the frontend and postgres in the backend.Would a PR exposing all of these modules under the
"i-implement-a-third-party-backend-and-opt-into-breaking-changes"
analogously to the following be acceptable?More specifically, I would make a small macro to avoid re-writing the same logic several times.
Beta Was this translation helpful? Give feedback.
All reactions