our goal is to get pg sql inbuilt functions present in a query given by an user.
TablesNamesFinder tablesNamesFinder = new TablesNamesFinder(){
@Override
public void visit(Function function) {
functionNames.add(function.getName().toLowerCase());
super.visit(function);
}
@Override
public void visit(TableFunction valuesList) {
functionNames.add(valuesList.getFunction().getName().toLowerCase());
super.visit(valuesList);
}
};
We have tried the above code but this will not give functions like
select current_user;
select current_schema;
SO kindly help us to get all functions in given sql query