import { astMapper } from "https://deno.land/x/pgsql_ast_parser@11.0.1/index.ts";
Builds an AST modifier based on the default implementation, merged with the one you provide.
Example of a modifier that renames all reference to columns 'foo' to 'bar'
const mapper = astMapper(b => ({
ref: a => assignChanged(a, {
name: a.name === 'foo'
? 'bar'
: a.name
})
}));
const modified = mapper.statement(myStatementToModify);