I just found your project and I am well impressed and thankful for your effort. So far, I have been trying to obtain the names of all the affected tables but not only on selects but on any statement, can anyone give me a lead?
Thank you in advance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I just found your project and I am well impressed and thankful for your effort. So far, I have been trying to obtain the names of all the affected tables but not only on selects but on any statement, can anyone give me a lead?
Thank you in advance.
Have TablesNamesFinder implements StatementVisitor too.
Then implement each visit method required by StatementVisitor. Something like this:
in TablesNamesFinder:
public List getTableList(Statement stm) {
tables = new ArrayList();
stm.accept(this);
return tables;
}
public void visit(Insert insert)
{
Table table = insert.getTable();
tables.add(table.getWholeTableName());
}
OP here, thank you very much for your assistance.