-
Notifications
You must be signed in to change notification settings - Fork 77
Expand file tree
/
Copy pathtestDropView.java
More file actions
22 lines (17 loc) · 854 Bytes
/
Copy pathtestDropView.java
File metadata and controls
22 lines (17 loc) · 854 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package redshift;
import gudusoft.gsqlparser.EDbVendor;
import gudusoft.gsqlparser.ESqlStatementType;
import gudusoft.gsqlparser.TGSqlParser;
import gudusoft.gsqlparser.stmt.TDropViewSqlStatement;
import junit.framework.TestCase;
public class testDropView extends TestCase {
public void test1() {
TGSqlParser sqlparser = new TGSqlParser(EDbVendor.dbvredshift);
sqlparser.sqltext = "drop view eventview cascade;";
assertTrue(sqlparser.parse() == 0);
assertTrue(sqlparser.sqlstatements.get(0).sqlstatementtype == ESqlStatementType.sstdropview);
TDropViewSqlStatement dropView = (TDropViewSqlStatement) sqlparser.sqlstatements.get(0);
assertTrue(dropView.getViewNameList().size() == 1);
assertTrue(dropView.getViewNameList().getObjectName(0).toString().equalsIgnoreCase("eventview"));
}
}