Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

How can I delete a set of values ? #899

Closed
pullmann4rent opened this issue Nov 9, 2023 · 1 comment
Closed

How can I delete a set of values ? #899

pullmann4rent opened this issue Nov 9, 2023 · 1 comment
Assignees
Labels
triage To be investigated

Comments

@pullmann4rent
Copy link

pullmann4rent commented Nov 9, 2023

Expected behavior

Hello,

pgp.helpers gives me insert and update but I cant see the delete function.

How can I delete an array of ids with pg-promise ?

const query = await t.none('DELETE FROM product_media WHERE id IN ...');

or how can I execute this query now ?

    const query = await t.none('DELETE FROM product_media WHERE id IN ($<values:raw>)');

        const cs = pgp.helpers.values(imgToDelete, ['id']);

        const cs_v = t.none
@pullmann4rent pullmann4rent added the triage To be investigated label Nov 9, 2023
@vitaly-t
Copy link
Owner

vitaly-t commented Nov 10, 2023

:csv filter does that

Repository owner locked and limited conversation to collaborators Nov 10, 2023
@vitaly-t vitaly-t converted this issue into discussion #900 Nov 10, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
triage To be investigated
Projects
None yet
Development

No branches or pull requests

2 participants