Skip to content

Commit 97ea9ac

Browse files
committed
Added SQL_SERVER_SNAPSHOT value to TransactionIsolationLevel enum
Sql Server supports a non-standard transaction isolation level called "SNAPSHOT" whose JDBC value is 0x1000 (4096). The new enum value adds support for this isolation level. The name "SQL_SERVER_SNAPSHOT" was chosen to reflect the fact that it is unique to SQL Server to avoid confusion.
1 parent e3eaef7 commit 97ea9ac

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/java/org/apache/ibatis/session/TransactionIsolationLevel.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@ public enum TransactionIsolationLevel {
2525
READ_COMMITTED(Connection.TRANSACTION_READ_COMMITTED),
2626
READ_UNCOMMITTED(Connection.TRANSACTION_READ_UNCOMMITTED),
2727
REPEATABLE_READ(Connection.TRANSACTION_REPEATABLE_READ),
28-
SERIALIZABLE(Connection.TRANSACTION_SERIALIZABLE);
28+
SERIALIZABLE(Connection.TRANSACTION_SERIALIZABLE),
29+
/**
30+
* A non-standard isolation level for Microsoft SQL Server. Defined in
31+
* the SQL Server JDBC driver {@link com.microsoft.sqlserver.jdbc.ISQLServerConnection}
32+
*/
33+
SQL_SERVER_SNAPSHOT(0x1000);
2934

3035
private final int level;
3136

0 commit comments

Comments
 (0)