/// <summary> /// Handles a savepoint request. /// </summary> /// <param name="type"> /// The request type. /// </param> /// <param name="savePointName"> /// The name of the save point. /// </param> internal void HandleSavepointRequest(SavepointRequestType type, string savePointName) { CheckValid(); CheckSavepointName(savePointName); HsqlSession session = m_connection.Session; switch (type) { case SavepointRequestType.Savepoint: { session.ExecuteDirect(string.Concat("SAVEPOINT ", savePointName)); break; } case SavepointRequestType.ReleaseSavepoint: { session.ExecuteDirect(string.Concat( "RELEASE SAVEPOINT ", savePointName)); break; } case SavepointRequestType.RollbackToSavepoint: { session.ExecuteDirect(string.Concat( "ROLLBACK TO SAVEPOINT ", savePointName)); break; } default: { // paranoia mode: never happens in practice. throw new HsqlDataSourceException(string.Concat( "Unhandled SavepointRequestType: ", type), org.hsqldb.Trace.GENERAL_ERROR, "S1000"); } } }
/// <summary> /// Handles a savepoint request. /// </summary> /// <param name="type"> /// The request type. /// </param> /// <param name="savePointName"> /// The name of the save point. /// </param> internal void HandleSavepointRequest(SavepointRequestType type, string savePointName) { CheckValid(); CheckSavepointName(savePointName); HsqlSession session = m_connection.Session; switch (type) { case SavepointRequestType.Savepoint: { session.ExecuteDirect(string.Concat("SAVEPOINT ", savePointName)); break; } case SavepointRequestType.ReleaseSavepoint: { session.ExecuteDirect(string.Concat( "RELEASE SAVEPOINT ", savePointName)); break; } case SavepointRequestType.RollbackToSavepoint: { session.ExecuteDirect(string.Concat( "ROLLBACK TO SAVEPOINT ",savePointName)); break; } default: { // paranoia mode: never happens in practice. throw new HsqlDataSourceException(string.Concat( "Unhandled SavepointRequestType: ",type), org.hsqldb.Trace.GENERAL_ERROR, "S1000"); } } }