Convert TOP to LIMIT

Proprietary

Replaces SQL Server's SELECT TOP n with a LIMIT n at the end of the query, as PostgreSQL expects. TOP ... PERCENT and TOP ... WITH TIES have no LIMIT equivalent, so are left as they are.

org.openrewrite.sql.ConvertTopToLimit
mod run . --recipe=org.openrewrite.sql.ConvertTopToLimit

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