Mercurial > hg > orthanc-databases
comparison Framework/Plugins/IndexUnitTests.h @ 207:d9ef3f16e6a2
wrapping transactions in API v3
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 19 Mar 2021 15:11:45 +0100 |
parents | 7299410c3d61 |
children | 13a3863df7fa |
comparison
equal
deleted
inserted
replaced
206:6dcf57074dd4 | 207:d9ef3f16e6a2 |
---|---|
422 | 422 |
423 { | 423 { |
424 // A transaction is needed here for MySQL, as it was not possible | 424 // A transaction is needed here for MySQL, as it was not possible |
425 // to implement recursive deletion of resources using pure SQL | 425 // to implement recursive deletion of resources using pure SQL |
426 // statements | 426 // statements |
427 db.StartTransaction(); | 427 db.StartTransaction(TransactionType_ReadWrite); |
428 db.DeleteResource(*output, c); | 428 db.DeleteResource(*output, c); |
429 db.CommitTransaction(); | 429 db.CommitTransaction(); |
430 } | 430 } |
431 | 431 |
432 ASSERT_FALSE(db.IsExistingResource(c)); | 432 ASSERT_FALSE(db.IsExistingResource(c)); |