-
Notifications
You must be signed in to change notification settings - Fork 77
Expand file tree
/
Copy pathtestIsolation.java
More file actions
24 lines (21 loc) · 840 Bytes
/
Copy pathtestIsolation.java
File metadata and controls
24 lines (21 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package sybase;
/*
* Date: 13-8-29
*/
import gudusoft.gsqlparser.EDbVendor;
import gudusoft.gsqlparser.EIsolationLevel;
import gudusoft.gsqlparser.TGSqlParser;
import gudusoft.gsqlparser.nodes.TIsolationClause;
import gudusoft.gsqlparser.stmt.TSelectSqlStatement;
import junit.framework.TestCase;
public class testIsolation extends TestCase {
public void test1(){
TGSqlParser sqlparser = new TGSqlParser(EDbVendor.dbvsybase);
sqlparser.sqltext = "Select abc from tablea\n" +
"at isolation 0";
assertTrue(sqlparser.parse() == 0);
TSelectSqlStatement select = (TSelectSqlStatement)sqlparser.sqlstatements.get(0);
TIsolationClause isolationClause = select.getIsolationClause();
assertTrue(isolationClause.getIsolationLevel() == EIsolationLevel.readUncommitted);
}
}