jeremydaly / data-api-client

A "DocumentClient" for the Amazon Aurora Serverless Data API
MIT License
441 stars 62 forks source link

suggestion for bulk delete #100

Open rabigautam opened 3 years ago

rabigautam commented 3 years ago

Accordingly to document I couldn't find bulk delete (delete row with different ids),Yeah I could perform the task by direct sql query but it would be better if the same pattern is followed as like bulk insert and bulk update

Valindo commented 3 years ago
let batchDelete = await data.query(
  `DELETE FROM myTable WHERE id=:id`,
  [
    [{ id: 17 }],
    [{ id:  15 }],
    [{ id:  14 }],
    [{ id:  12 }],
    [{ id:  11 }]
  ]
)

Theoretically this should work

rabigautam commented 3 years ago

thank you for your suggestion

Valindo commented 3 years ago

@rabimatuag if this solves your issue, please close the issue :)