typelevel / typelevel/doobie

[Feature Request] RETURNING *

Open
#718 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature Request
Dominant language
Scala
Stars
2.2k
Forks
379
Avg merge
14m
Merged PRs (30d)
8

Description

Hello it would be great if a database supports RETURNING * that it will be possible to write something like:

withGeneratedKeys[Demo]("*") or something along the lines.

As a workaround I write my "INSERT/UPDATE" Queries like that:

sql"INSERT INTO demo (id, text) VALUES (1, 'hallo') RETURNING *".query[Demo].unique

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the withGeneratedKeysDemo entry point and compare it with the SQL INSERT/UPDATE RETURNING * workaround shown in the issue. Define how generated-key retrieval should represent all returned columns, then verify that the proposed API supports the Demo example and database RETURNING * behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala, sql
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.