mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved sql parser.
This commit is contained in:
@@ -16,17 +16,13 @@
|
||||
package com.alibaba.druid.bvt.sql.postgresql;
|
||||
|
||||
import com.alibaba.druid.sql.PGTest;
|
||||
import com.alibaba.druid.sql.dialect.postgresql.ast.stmt.PGBeginStatement;
|
||||
import com.alibaba.druid.sql.dialect.postgresql.ast.stmt.PGStartTransactionStatement;
|
||||
|
||||
public class PGBeginTest extends PGTest {
|
||||
public void testBegin() throws Exception {
|
||||
String sql = "begin;";
|
||||
String expected = "BEGIN";
|
||||
testParseSql(sql, expected, expected, PGBeginStatement.class);
|
||||
|
||||
sql = "start transaction;";
|
||||
expected = "START TRANSACTION";
|
||||
testParseSql(sql, expected, expected, PGBeginStatement.class);
|
||||
String sql = "start transaction;";
|
||||
String expected = "START TRANSACTION";
|
||||
testParseSql(sql, expected, expected, PGStartTransactionStatement.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
package com.alibaba.druid.bvt.sql.postgresql;
|
||||
|
||||
import com.alibaba.druid.sql.PGTest;
|
||||
import com.alibaba.druid.sql.dialect.postgresql.ast.stmt.PGCommitStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCommitStatement;
|
||||
|
||||
public class PGCommitTest extends PGTest {
|
||||
public void testCommit() throws Exception {
|
||||
String sql = "commit;";
|
||||
String expected = "COMMIT";
|
||||
testParseSql(sql, expected, expected, PGCommitStatement.class);
|
||||
testParseSql(sql, expected, expected, SQLCommitStatement.class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user