Skip to content

Commit

Permalink
doc: explain the TablesNamesFinder, fix the example
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Reichel <andreas@manticore-projects.com>
  • Loading branch information
manticore-projects committed Aug 20, 2023
1 parent d25be77 commit 204d097
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/site/sphinx/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ The class ``net.sf.jsqlparser.util.TablesNamesFinder`` can be used to return all
// find in Expressions
String exprStr = "A.id=B.id and A.age = (select age from C)";
tableNames = TablesNamesFinder.findTables(sqlStr);
tableNames = TablesNamesFinder.findTablesInExpression(exprStr);
assertThat( tableNames ).containsExactlyInAnyOrder("A", "B", "C");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ void testJoinSubSelect() throws JSQLParserException {
assertThat( tableNames ).containsExactlyInAnyOrder("A", "B", "C");

String exprStr = "A.id=B.id and A.age = (select age from C)";
tableNames = TablesNamesFinder.findTables(sqlStr);
tableNames = TablesNamesFinder.findTablesInExpression(exprStr);
assertThat( tableNames ).containsExactlyInAnyOrder("A", "B", "C");
}
}

0 comments on commit 204d097

Please sign in to comment.