What is the value of swapTable
? Iām not sure if you can add additional constraints in this way but see if you can get past the error.
Looks like you can do it a different way using destroyAll
, tested with about 5 rows. Iām not sure how well it will do with larger amounts e.g. in the 100s/1000s.
Cloud function (or run it with the SDK in your app):
Moralis.Cloud.define("deleteMany", async (request) => {
const query = new Moralis.Query("Ages");
query.greaterThan("age", 3);
query.find().then(Moralis.Object.destroyAll);
});