-
Notifications
You must be signed in to change notification settings - Fork 77
Expand file tree
/
Copy pathtestLockTable.java
More file actions
21 lines (16 loc) · 847 Bytes
/
Copy pathtestLockTable.java
File metadata and controls
21 lines (16 loc) · 847 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package test;
import gudusoft.gsqlparser.EDbVendor;
import gudusoft.gsqlparser.ELockMode;
import gudusoft.gsqlparser.TGSqlParser;
import gudusoft.gsqlparser.stmt.TLockTableStmt;
import junit.framework.TestCase;
public class testLockTable extends TestCase {
public void testNetezza(){
TGSqlParser sqlparser = new TGSqlParser(EDbVendor.dbvnetezza);
sqlparser.sqltext = "LOCK TABLE IDP_PRD_LEVEL2.L2_IDP_ENTERPRISE.FINANCIAL_INSTRUMENT_ALIAS IN EXCLUSIVE MODE;";
assertTrue(sqlparser.parse() == 0);
TLockTableStmt lockTableStmt = (TLockTableStmt)sqlparser.sqlstatements.get(0);
assertTrue(lockTableStmt.getTalbe().getTableName().toString().equalsIgnoreCase("IDP_PRD_LEVEL2.L2_IDP_ENTERPRISE.FINANCIAL_INSTRUMENT_ALIAS"));
assertTrue(lockTableStmt.getLockMode() == ELockMode.exclusive);
}
}