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

Support RETURNING Clause #138

Closed
1 task done
ginnwork opened this issue Dec 23, 2024 · 0 comments · Fixed by #139
Closed
1 task done

Support RETURNING Clause #138

ginnwork opened this issue Dec 23, 2024 · 0 comments · Fixed by #139

Comments

@ginnwork
Copy link
Contributor

Describe the feature

Several databases support the RETURNING clause to return row data when using the INSERT, UPDATE, and DELETE statements.

SQLite Example

const del = await db.sql`
  DELETE FROM users
  WHERE id = 1
  RETURNING *
`
console.log(del)

Current Results

{
  success: true
}

Desired Results

{ 
  rows: [
    { id: 1, name: 'Alice' }
  ]
}

Additional information

  • Would you be willing to help implement this feature?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant