Find UPDATE and DELETE statements without a WHERE clause

Proprietary

An UPDATE or DELETE with no WHERE clause touches every row in the table, holding locks for the duration, flooding replication, and risking unintended data loss if the missing predicate was an oversight.

org.openrewrite.sql.antipattern.FindDmlWithoutWhere

Optional

markSourceBoolean

Whether to mark each occurrence in source, and apply the fix where the rule remediates. Defaults to true; set to false to leave source untouched and report only to the data table, as an analysis-only pipeline requires.

mod run . --recipe=org.openrewrite.sql.antipattern.FindDmlWithoutWhere

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.