Specifies SQL Anywhere isolation levels.
Public Enum SAIsolationLevel
public enum SAIsolationLevel
Member name | Description |
---|---|
Chaos |
This isolation level is unsupported. If you call SAConnection.BeginTransaction with this isolation level, an exception is thrown. For more information, see BeginTransaction method. |
ReadCommitted |
Sets the behavior to be equivalent to isolation level 1. This isolation level prevents dirty reads, but allows non-repeatable reads and phantom rows. For more information, see Isolation levels and consistency. |
ReadUncommitted |
Sets the behavior to be equivalent to isolation level 0. This isolation level allows dirty reads, non-repeatable reads, and phantom rows. For more information, see Isolation levels and consistency. |
RepeatableRead |
Sets the behavior to be equivalent to isolation level 2. This isolation level prevents dirty reads and guarantees repeatable reads. However, it allows phantom rows. For more information, see Isolation levels and consistency. |
Serializable |
Sets the behavior to be equivalent to isolation level 3. This isolation level prevents dirty reads, guarantees repeatable reads, and prevents phantom rows. For more information, see Isolation levels and consistency. |
Snapshot |
Uses a snapshot of committed data from the time when the first row is read, inserted, updated, or deleted by the transaction. This isolation level uses a snapshot of committed data from the time when the first row is read or updated by the transaction. For more information, see Isolation levels and consistency. |
Unspecified |
This isolation level is unsupported. If you call SAConnection.BeginTransaction with this isolation level, an exception is thrown. For more information, see BeginTransaction method. |
ReadOnlySnapshot |
For read-only statements, use a snapshot of committed data from the time when the first row is read from the database. Non-repeatable reads and phantom rows can occur within a transaction, but not within a single statement. For updatable statements, use the isolation level specified by the updatable_statement_isolation option (can be one of 0 (the default), 1, 2, or 3). For more information, see Isolation levels and consistency. |
StatementSnapshot |
Use a snapshot of committed data from the time when the first row is read by the statement. Each statement within the transaction sees a snapshot of data from a different time. For each statement, use a snapshot of committed data from the time when the first row is read from the database. Non-repeatable reads and phantom rows can occur within a transaction, but not within a single statement. For more information, see Isolation levels and consistency. |
This class augments the System.Data.IsolationLevel class.
The SQL Anywhere .NET Data Provider supports all SQL Anywhere isolation levels, including the snapshot isolation levels. To use snapshot isolation, specify one of SAIsolationLevel.Snapshot, SAIsolationLevel.ReadOnlySnapshot, or SAIsolationLevel.StatementSnapshot as the parameter to BeginTransaction. BeginTransaction has been overloaded so it can take either an IsolationLevel or an SAIsolationLevel. The values in the two enumerations are the same, except for ReadOnlySnapshot and StatementSnapshot which exist only in SAIsolationLevel. There is a new property in SATransaction called SAIsolationLevel that gets the SAIsolationLevel.
For more information, see Snapshot isolation.
Discuss this page in DocCommentXchange.
|
Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0 |