mirror of https://gitee.com/bigwinds/arangodb
add write collections before read collections
This commit is contained in:
parent
bafb352698
commit
0fea8cc711
|
@ -58,14 +58,14 @@ class ExplicitTransaction : public Transaction {
|
||||||
}
|
}
|
||||||
|
|
||||||
this->setAllowImplicitCollections(allowImplicitCollections);
|
this->setAllowImplicitCollections(allowImplicitCollections);
|
||||||
|
|
||||||
|
for (auto const& it : writeCollections) {
|
||||||
|
this->addCollection(it, TRI_TRANSACTION_WRITE);
|
||||||
|
}
|
||||||
|
|
||||||
for (auto const& it : readCollections) {
|
for (auto const& it : readCollections) {
|
||||||
this->addCollection(it, TRI_TRANSACTION_READ);
|
this->addCollection(it, TRI_TRANSACTION_READ);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto const& it : writeCollections) {
|
|
||||||
this->addCollection(it, TRI_TRANSACTION_WRITE);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -86,14 +86,14 @@ class ExplicitTransaction : public Transaction {
|
||||||
if (waitForSync) {
|
if (waitForSync) {
|
||||||
this->setWaitForSync();
|
this->setWaitForSync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (auto const& it : writeCollections) {
|
||||||
|
this->addCollection(it, TRI_TRANSACTION_WRITE);
|
||||||
|
}
|
||||||
|
|
||||||
for (auto const& it : readCollections) {
|
for (auto const& it : readCollections) {
|
||||||
this->addCollection(it, TRI_TRANSACTION_READ);
|
this->addCollection(it, TRI_TRANSACTION_READ);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto const& it : writeCollections) {
|
|
||||||
this->addCollection(it, TRI_TRANSACTION_WRITE);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Reference in New Issue