Change a SQL function name
ProprietaryWhen migrating between dialects, often one name can be substituted for another. For example, Oracle's NVL function can be replaced with Postgres COALESCE.
org. openrewrite. sql. ChangeFunctionNameRequired
The name of the function to find, case insensitive.
The new name to use. This will match the casing of the original method when a replacement is made.
Optional
Only rename calls with exactly this many arguments, for when the new function accepts fewer arguments than the old one. Calls with any number of arguments are renamed when not set.
mod run . --recipe= org. openrewrite. sql. ChangeFunctionName \
-P oldFunctionName= NVL \
-P newFunctionName= COALESCEInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.