improve SQL Parser

This commit is contained in:
wenshao
2012-12-29 16:08:29 +08:00
parent 16ed4c1078
commit a60fe40542
10 changed files with 174 additions and 32 deletions
@@ -26,10 +26,10 @@ public class PGFormatTest extends TestCase {
public void test_0() throws Exception {
String sql = "CREATE TABLE foo (fooid int, foosubid int, fooname text);";
String formatedSql = SQLUtils.format(sql, JdbcUtils.POSTGRESQL);
Assert.assertEquals("CREATE TABLE foo (\n" + //
"\tfooid int, \n" + //
"\tfoosubid int, \n" + //
"\tfooname text\n" + //
")", formatedSql);
Assert.assertEquals("CREATE TABLE foo (" + //
"\n\tfooid int," + //
"\n\tfoosubid int," + //
"\n\tfooname text" + //
"\n)", formatedSql);
}
}