You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unless I missed something, I was not able to find an example for using .filter_target() in the inline documentation. This corresponds to ON CONFLICT ... WHERE index_predicate DO UPDATE SET ..., which is different from the WHERE clause after DO UPDATE. It took me a bit of digging to figure out that diesel actually supports this.
It would be great if the we can add an example for this use case.
What are you trying to accomplish?
Using the ON CONFLICT ... WHERE index_predicate syntax with partial unique indexes.
(N/A, inline doc) This issue can be reproduced on Rust's stable channel. (Your issue will be
closed if this is not the case)
(N/A, inline doc) This issue can be reproduced without requiring a third party crate
Potential solution
I propose that all the examples can be moved to the upsert module or the IncompleteOnConflict struct, which will make more sense if we were to add an example using filter_target()
PS: There should be a separate issue template documentation related issues.
The text was updated successfully, but these errors were encountered:
Thanks for writing this bug report. Please complete the issue template. Its mandatory for issues in our tracker.. If you don't feel that your report fits into the template consider moving it to discussion forum.
Setup
Versions
Feature Flags
["chrono", "uuid", "serde_json"]
Problem Description
Unless I missed something, I was not able to find an example for using
.filter_target()
in the inline documentation. This corresponds toON CONFLICT ... WHERE index_predicate DO UPDATE SET ...
, which is different from theWHERE
clause afterDO UPDATE
. It took me a bit of digging to figure out that diesel actually supports this.It would be great if the we can add an example for this use case.
What are you trying to accomplish?
Using the
ON CONFLICT ... WHERE index_predicate
syntax with partial unique indexes.What is the expected output?
N/A
What is the actual output?
N/A
Are you seeing any additional errors?
N/A
Steps to reproduce
Documentation for normal on conflict do update with extensive examples.
https://docs.diesel.rs/2.1.x/diesel/upsert/struct.IncompleteOnConflict.html#examples
filter_target
function is grouped with the traithttps://docs.diesel.rs/2.1.x/diesel/upsert/struct.IncompleteOnConflict.html#method.filter_target
Checklist
closed if this is not the case)
Potential solution
I propose that all the examples can be moved to the
upsert
module or theIncompleteOnConflict
struct, which will make more sense if we were to add an example usingfilter_target()
PS: There should be a separate issue template documentation related issues.
The text was updated successfully, but these errors were encountered: