-
Notifications
You must be signed in to change notification settings - Fork 77
Expand file tree
/
Copy pathtestDropSchema.java
More file actions
23 lines (16 loc) · 816 Bytes
/
Copy pathtestDropSchema.java
File metadata and controls
23 lines (16 loc) · 816 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package test.redshift;
import gudusoft.gsqlparser.EDbVendor;
import gudusoft.gsqlparser.ESqlStatementType;
import gudusoft.gsqlparser.TGSqlParser;
import gudusoft.gsqlparser.stmt.redshift.TRedshiftDropSchema;
import junit.framework.TestCase;
public class testDropSchema extends TestCase {
public void test1() {
TGSqlParser sqlparser = new TGSqlParser(EDbVendor.dbvredshift);
sqlparser.sqltext = "drop schema s_sales restrict;";
assertTrue(sqlparser.parse() == 0);
assertTrue(sqlparser.sqlstatements.get(0).sqlstatementtype == ESqlStatementType.sstredshiftDropSchema);
TRedshiftDropSchema dropSchema = (TRedshiftDropSchema) sqlparser.sqlstatements.get(0);
assertTrue(dropSchema.getNameList().getObjectName(0).toString().equalsIgnoreCase("s_sales"));
}
}