Replies: 1 comment
-
Thanks for opening this discussion. I think I would be fine with opening up the relevant parts behind the That written I do believe that the story around extending this part of diesel is not good yet, so I'm happy if someone has a look at this and comes up with a easier to extend interface. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Based on my attempts, trying to extend STRAIGHT_JOIN by referencing the implementation of INNER JOIN requires accessing pub(crate) fields, which is not feasible. I would like to use STRAIGHT_JOIN as part of a complex and large query, so the method described in the documentation (https://diesel.rs/guides/extending-diesel.html), which involves constructing the entire query at once, is not suitable. Instead, I would like to create a custom extension using an implementation similar to InternalJoinDsl. How about either removing the pub(crate) restriction or providing an alternative mechanism to enable similar custom implementations?
Other potential extension targets could include:
・FORCE INDEX
・Optimizer Hints
・and other engine's stuff...
InternalJoinDsl:
diesel/diesel/src/query_builder/select_statement/dsl_impls.rs
Lines 79 to 122 in 977a2b0
Beta Was this translation helpful? Give feedback.
All reactions