Skip to content

Conversation

@stephencelis
Copy link
Member

This implementation may be the way to go. We can merge it into the other PR branch if we decide to go this direction.

Notably I did keep the overloads for the existing APIs, because it would be annoying to ignore excluded when you don't need it and lose out on $0 shorthand syntax:

-onConflictDoUpdate: {
-  $0.title += " (Copy)"
+onConflictDoUpdate: { reminder, _ in
+  reminder.title += " (Copy)"
 }

So in this PR, it still compiles.

@stephencelis stephencelis requested a review from mbrandonw June 25, 2025 00:18
@stephencelis stephencelis marked this pull request as ready for review June 25, 2025 20:10
@stephencelis stephencelis merged commit 634c6a2 into excluded-support Jul 11, 2025
3 checks passed
@stephencelis stephencelis deleted the excluded-support-alt branch July 11, 2025 22:46
stephencelis added a commit that referenced this pull request Jul 11, 2025
* Reintroduce `excluded` to upsert clauses

The original implementation in #95 had to be reverted due to issues with
nested dynamic member lookup. This PR makes a breaking change to the
`Updates` type, instead, to introduce this surface area.

* wip

* wip

* An alternate implementation of `excluded` conflict resolution (#100)

* wip
coenttb pushed a commit to coenttb/swift-structured-queries-postgres that referenced this pull request Oct 14, 2025
* Reintroduce `excluded` to upsert clauses

The original implementation in pointfreeco#95 had to be reverted due to issues with
nested dynamic member lookup. This PR makes a breaking change to the
`Updates` type, instead, to introduce this surface area.

* wip

* wip

* An alternate implementation of `excluded` conflict resolution (pointfreeco#100)

* wip
coenttb pushed a commit to coenttb/swift-structured-queries-postgres that referenced this pull request Oct 15, 2025
* Reintroduce `excluded` to upsert clauses

The original implementation in pointfreeco#95 had to be reverted due to issues with
nested dynamic member lookup. This PR makes a breaking change to the
`Updates` type, instead, to introduce this surface area.

* wip

* wip

* An alternate implementation of `excluded` conflict resolution (pointfreeco#100)

* wip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants