Skip to content

Commit

Permalink
补充testcase---兼容mysql的另一种语法:show columns from tableName in databaseName;
Browse files Browse the repository at this point in the history
  • Loading branch information
abirdman committed May 6, 2015
1 parent 3963836 commit 1c62c49
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,17 @@ public void test_2() throws Exception {

Assert.assertEquals("SHOW COLUMNS FROM mydb.mytable;", text);
}

public void test_3() throws Exception {
String sql = "SHOW COLUMNS FROM mytable IN mydb;";

SQLStatementParser parser = new MySqlStatementParser(sql);
List<SQLStatement> stmtList = parser.parseStatementList();

String text = output(stmtList);

Assert.assertEquals("SHOW COLUMNS FROM mydb.mytable;", text);
}

private String output(List<SQLStatement> stmtList) {
StringBuilder out = new StringBuilder();
Expand Down

0 comments on commit 1c62c49

Please sign in to comment.