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

[FEATURE]: Add ability to use relations in returning() #2325

Open
jakeleventhal opened this issue May 15, 2024 · 0 comments
Open

[FEATURE]: Add ability to use relations in returning() #2325

jakeleventhal opened this issue May 15, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@jakeleventhal
Copy link

Describe what you want

I want to be able to specify with in a returning clause. For instance:

// Current code
await db.update(users).set({ email }).where(...);
const newUser = await db.query.users.findFirst({ where: ..., with: {settings: true });

// Proposed code
const newUser = await db.update(users).set({ email }).where(...).returning({ with: {settings: true} });
@jakeleventhal jakeleventhal added the enhancement New feature or request label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant