Open dantownsend opened 3 years ago
@dantownsend We can do this similarly to visible_fields. My question is whether we can replace the delete_all
method (which is disabled by default with allow_bulk_delete
is False
) with delete_bulk
method or delete_bulk
method must be separated, with a separate endpoint? If we can replace delete_all
(I already wrote working code) we can set allow_bulk_delete
to True because there is no longer a chance for user to delete all records, but only the results whose id
is in the query params. For example:
DELETE /api/tables/movies/?__ids=1,2,3,4,5 (only rows with id is in __ids will be deleted)
@dantownsend What do you think of this idea?
Currently,
PiccoloCRUD
(and henceFastAPIWrapper
) allow you to filter by the row ID, but you can't filter by a list of IDs.For example:
This would be a very useful feature, and would make bulk deletes more efficient.