Mercurial > hg > orthanc-databases
comparison Framework/Common/DatabaseManager.cpp @ 242:b97a537f4613
MySQL: Support of range reads for the storage area
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 13 Apr 2021 17:00:02 +0200 |
parents | a063bbf10a3e |
children | 8a4ce70f456a |
comparison
equal
deleted
inserted
replaced
241:a063bbf10a3e | 242:b97a537f4613 |
---|---|
267 void DatabaseManager::Transaction::Commit() | 267 void DatabaseManager::Transaction::Commit() |
268 { | 268 { |
269 if (active_) | 269 if (active_) |
270 { | 270 { |
271 manager_.CommitTransaction(); | 271 manager_.CommitTransaction(); |
272 active_ = true; | 272 active_ = false; |
273 } | 273 } |
274 else | 274 else |
275 { | 275 { |
276 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); | 276 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); |
277 } | 277 } |
281 void DatabaseManager::Transaction::Rollback() | 281 void DatabaseManager::Transaction::Rollback() |
282 { | 282 { |
283 if (active_) | 283 if (active_) |
284 { | 284 { |
285 manager_.RollbackTransaction(); | 285 manager_.RollbackTransaction(); |
286 active_ = true; | 286 active_ = false; |
287 } | 287 } |
288 else | 288 else |
289 { | 289 { |
290 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); | 290 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); |
291 } | 291 } |