conn.setTransactionIsolation(Connection.TRANSACTION_REPEATABLE_READ);
...
static int TRANSACTION_NONE
A constant indicating that transactions are not supported.
static int TRANSACTION_READ_COMMITTED
A constant indicating that dirty reads are prevented; non-repeatable reads and phantom reads can occur.
static int TRANSACTION_READ_UNCOMMITTED
A constant indicating that dirty reads, non-repeatable reads and phantom reads can occur.
static int TRANSACTION_REPEATABLE_READ
A constant indicating that dirty reads and non-repeatable reads are prevented; phantom reads can occur.
static int TRANSACTION_SERIALIZABLE
A constant indicating that dirty reads, non-repeatable reads and phantom reads are prevented.
setTransactionIsolation
最新推荐文章于 2023-09-29 18:24:34 发布