#include <DbXml.hpp> void XmlManager::upgradeContainer(const std::string &name, XmlUpdateContext &context);
Upgrades the container from a previous version of Berkeley DB XML, or
Berkeley DB, to the current version. A Berkeley DB upgrade is first
performed using the Db::upgrade
method, and then the Berkeley DB
XML container is upgraded. If no upgrade is needed, then no changes
are made.
Container upgrades are done in place and are destructive. For example, if pages need to be allocated and no disk space is available, the container may be left corrupted. Backups should be made before containers are upgraded. See Upgrading databases for more information.
The container must be closed; the system throws an exception if the container is open.
The XmlUpdateContext object to be used for this operation.
The XmlManager::upgradeContainer
method may
fail and throw
XmlException
, encapsulating one of the following
non-zero errors:
An error occurred in an underlying Berkeley DB database. The XmlException::getDbErrno method will return the error code for the error.