I have just started to explore JSqlparser. According to my understanding, I have modified the TablesNamesFinder to extract columns and tables and its working fine but a very small problem.
@Override
public void visit(Column col) {
Column c = col;
String cname = c.getFullyQualifiedName();
Table t = c.getTable();
System.out.println(t.getName());
}
This wont print table, for most of the cases it prints null and for very few cases it prints alias of the table but not the table. Is there anything I am forgetting?
Rest of the visits
@Override
public void visit(SelectExpressionItem exp){
exp.getExpression().accept(this);
}
@Override
public void visit(Table tableName) {
// System.out.println(tableName.getFullyQualifiedName());
}
@Override
public void visit(Select select) {
select.getSelectBody().accept(this);
}