Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add returning support in MERGE queries. #1171

Draft
wants to merge 5 commits into
base: v0.28
Choose a base branch
from

Conversation

igalklebanov
Copy link
Member

@igalklebanov igalklebanov commented Oct 7, 2024

Hey 👋

closes #1169.

As of PostgreSQL 17, MERGE queries now have returning clause support.

  • add returning/returningAll to MERGE.
  • add MultiTableReturningInterface, enforce it across DeleteQueryBuilder, UpdateQueryBuilder and MERGE builders. Why? the existing ReturningInterface doesn't have the returningAll(tables) methods, and INSERT queries are the only ones that don't support returning table.*.
  • add a way to return merge_action() in a type-safe and aliasable way.
  • tests.

@igalklebanov igalklebanov added api Related to library's API enhancement New feature or request postgres Related to PostgreSQL labels Oct 7, 2024
Copy link

vercel bot commented Oct 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
kysely ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 12, 2024 11:47am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Related to library's API enhancement New feature or request postgres Related to PostgreSQL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant