Skip to content

Commit 46323b4

Browse files
committed
1 parent 0415140 commit 46323b4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,7 @@ public void testDescribe() throws JSQLParserException {
572572
assertEquals(1, tableList.size());
573573
assertEquals("foo.product", tableList.get(0));
574574
}
575+
575576
@Test
576577
public void testBetween() throws JSQLParserException {
577578
String sql = "mycol BETWEEN (select col2 from mytable) AND (select col3 from mytable2)";
@@ -583,4 +584,14 @@ public void testBetween() throws JSQLParserException {
583584
assertTrue(tableList.contains("mytable2"));
584585

585586
}
587+
588+
@Test
589+
public void testRemoteLink() throws JSQLParserException {
590+
String sql = "select * from table1@remote";
591+
Statement stmt = CCJSqlParserUtil.parse(sql);
592+
TablesNamesFinder tablesNamesFinder = new TablesNamesFinder();
593+
List<String> tableList = tablesNamesFinder.getTableList(stmt);
594+
assertEquals(1, tableList.size());
595+
assertTrue(tableList.contains("table1@remote"));
596+
}
586597
}

0 commit comments

Comments
 (0)