kysely icon indicating copy to clipboard operation
kysely copied to clipboard

add `OUTPUT` clause support.

Open igalklebanov opened this issue 1 year ago • 1 comments

Hey 👋

output clause is supported in dialects such as MS SQL Server (MSSQL).

It works just like returning, but:

  • forces columns to be prefixed with inserted for new values, deleted for old values, and table names/aliases that are not the main table. Since we don't support mssql's way of adding more tables to context in all the queries output is supported in, I left it out for a future PR.
  • for merge queries, $action that returns delete, insert or update. if #700 gets merged, need to add this - will be quite easy.
  • can be used to insert into a variable or another table with the into sub-clause. left it out for a future PR.

igalklebanov avatar Jan 01 '24 00:01 igalklebanov

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 Mar 23, 2024 5:19pm

vercel[bot] avatar Jan 01 '24 00:01 vercel[bot]

👏👏👏👏👏👏

khangal avatar Mar 24 '24 06:03 khangal

When will this be getting released?

tmrclark avatar Jun 05 '24 20:06 tmrclark

@igalklebanov @koskimas Is this on its way to be published? I cannot find docs on how to use it.

magnusrodseth avatar Jun 26 '24 12:06 magnusrodseth