Dry run
Set options.dryRun to true to simulate the update process. The API returns a detailed report of the changes that would have been applied without modifying any data in your database. This is useful for testing complex filters or validation rules before executing them.
- Manta data table
- PostgreSQL
TypeScript
const preview = await manta.updateRecords({
table: "products",
data: { price: 149.99 },
where: { category_id: "electronics" },
options: {
dryRun: true,
},
});
console.log('Preview of changes:', preview.data.wouldUpdate);
TypeScript
const preview = await manta.updateRecords({
db: "inventory_pg",
table: "products",
data: { price: 149.99 },
where: { category_id: "electronics" },
options: {
dryRun: true,
},
});
console.log('Preview of changes:', preview.data.wouldUpdate);