summaryrefslogtreecommitdiff
path: root/cpp/src/XMLTransform/XMLTransform.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2002-11-20 20:17:12 +0000
committerBenoit Foucher <benoit@zeroc.com>2002-11-20 20:17:12 +0000
commit996a9ed826b78ec6b1852b66fccf0d84c16bdcc2 (patch)
tree84dc44a70e54318af1b3cdabbeec651829841aee /cpp/src/XMLTransform/XMLTransform.cpp
parentadding BuiltinSequences schema (diff)
downloadice-996a9ed826b78ec6b1852b66fccf0d84c16bdcc2.tar.bz2
ice-996a9ed826b78ec6b1852b66fccf0d84c16bdcc2.tar.xz
ice-996a9ed826b78ec6b1852b66fccf0d84c16bdcc2.zip
- Added transactional method to Freeze DB API.
- Added sync() method to flush the memory pool to the disk. - Improved XMLTransform tests.
Diffstat (limited to 'cpp/src/XMLTransform/XMLTransform.cpp')
-rw-r--r--cpp/src/XMLTransform/XMLTransform.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/cpp/src/XMLTransform/XMLTransform.cpp b/cpp/src/XMLTransform/XMLTransform.cpp
index 37f9916f060..8c9fa8446f8 100644
--- a/cpp/src/XMLTransform/XMLTransform.cpp
+++ b/cpp/src/XMLTransform/XMLTransform.cpp
@@ -2640,7 +2640,7 @@ XMLTransform::DBTransformer::transform(const DBEnvironmentPtr& dbEnv, const DBPt
//
// Transform value
//
- Value value = db->get(k);
+ Value value = db->getWithTxn(txn, k);
string fullValue;
fullValue.append(header);
fullValue.append(&value[0], value.size());
@@ -2662,15 +2662,15 @@ XMLTransform::DBTransformer::transform(const DBEnvironmentPtr& dbEnv, const DBPt
// Update database - only insert new key,value pair if the transformed
// key doesn't match an existing key.
//
- db->del(k);
- if(db->contains(newKey))
+ db->delWithTxn(txn, k);
+ if(db->containsWithTxn(txn, newKey))
{
reason = "transformed key matches an existing record:\n" + keyStr;
txn->abort();
txn = 0;
break;
}
- db->put(newKey, newValue);
+ db->putWithTxn(txn, newKey, newValue);
}
if(txn)