Skip to content

Commit 204d097

Browse files
doc: explain the TablesNamesFinder, fix the example
Signed-off-by: Andreas Reichel <[email protected]>
1 parent d25be77 commit 204d097

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/site/sphinx/usage.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ The class ``net.sf.jsqlparser.util.TablesNamesFinder`` can be used to return all
200200
201201
// find in Expressions
202202
String exprStr = "A.id=B.id and A.age = (select age from C)";
203-
tableNames = TablesNamesFinder.findTables(sqlStr);
203+
tableNames = TablesNamesFinder.findTablesInExpression(exprStr);
204204
assertThat( tableNames ).containsExactlyInAnyOrder("A", "B", "C");
205205
206206

src/test/java/net/sf/jsqlparser/util/TablesNamesFinderTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ void testJoinSubSelect() throws JSQLParserException {
493493
assertThat( tableNames ).containsExactlyInAnyOrder("A", "B", "C");
494494

495495
String exprStr = "A.id=B.id and A.age = (select age from C)";
496-
tableNames = TablesNamesFinder.findTables(sqlStr);
496+
tableNames = TablesNamesFinder.findTablesInExpression(exprStr);
497497
assertThat( tableNames ).containsExactlyInAnyOrder("A", "B", "C");
498498
}
499499
}

0 commit comments

Comments
 (0)