XmlManager::truncateContainer

#include <DbXml.hpp>

void XmlManager::truncateContainer(
	const std::string &name, XmlUpdateContext &context)

void XmlManager::truncateContainer(
	XmlTransaction &txn, const std::string &name,
	XmlUpdateContext &context)

void XmlManager::truncateContainer(
	const std::string &name, XmlUpdateContext &context, 
	const XmlContainerConfig &flags)

void XmlManager::truncateContainer(
	XmlTransaction &txn, const std::string &name,
	XmlUpdateContext &context, 
	const XmlContainerConfig &flags)

Truncates all of the databases in the container using Db::truncate.

The container must be closed; the system throws an exception if the container is open.

Parameters

txn

If the operation is to be transaction-protected, the txn parameter is an XmlTransaction handle returned from XmlManager::createTransaction.

name

The name of the container to be truncated.

context

The XmlUpdateContext object to be used for this operation.

flags

This parameter is unused.

Errors

The XmlManager::upgradeContainer method may fail and throw XmlException , encapsulating one of the following non-zero errors:

CONTAINER_OPEN

The container is open.

DATABASE_ERROR

An error occurred in an underlying Berkeley DB database. The XmlException::getDbErrno method will return the error code for the error.

Class

XmlManager

See Also

XmlManager Methods