com.github.chengyuxing.sql.transaction.Level Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rabbit-sql Show documentation
Show all versions of rabbit-sql Show documentation
Light wrapper of JDBC, support ddl, dml, query, plsql/procedure/function, transaction and manage sql
file.
package com.github.chengyuxing.sql.transaction;
import java.sql.Connection;
/**
* Transaction level.
*/
public enum Level {
NONE(Connection.TRANSACTION_NONE, "none"),
READ_UNCOMMITTED(Connection.TRANSACTION_READ_UNCOMMITTED, "read_unCommit"),
READ_COMMITTED(Connection.TRANSACTION_READ_COMMITTED, "read_commit"),
REPEATABLE_READ(Connection.TRANSACTION_REPEATABLE_READ, "repeatable_read"),
SERIALIZABLE(Connection.TRANSACTION_SERIALIZABLE, "serializable");
private final int value;
private final String name;
Level(int value, String name) {
this.value = value;
this.name = name;
}
public int getValue() {
return value;
}
public String getName() {
return name;
}
}