XmlManager::createContainer API Ref

#include <DbXml.hpp>

XmlContainer XmlManager::createContainer(const std::string &name) XmlContainer XmlManager::createContainer( XmlTransaction &txn, const std::string &name) XmlContainer XmlManager::createContainer(const std::string &name, const XmlContainerConfig &config) XmlContainer XmlManager::createContainer( XmlTransaction &txn, const std::string &name, XmlContainerConfig config) XmlContainer XmlManager::createContainer(const std::string &name, const XmlContainerConfig &flags, XmlContainer::ContainerType type, int mode = 0) XmlContainer XmlManager::createContainer(XmlTransaction &txn, const std::string &name, const XmlContainerConfig &flags, XmlContainer::ContainerType type, int mode = 0)


Description: XmlManager::createContainer

Creates and opens a container, returning a handle to an XmlContainer object. If the container already exists at the time this method is called, an exception is thrown.

Use XmlManager::openContainer to open a container that has already been created.

Containers always remain open until the last handle referencing the container is destroyed.


Description: XmlManager::createContainer(XmlTransaction &txn, const std::string &name)

Creates a default container. The container is created using the settings XmlContainerConfig::setAllowCreate and XmlContainerConfig::setExclusiveCreate set to true unless the default behavior has been overridden using XmlManager::setDefaultContainerConfig. In addition, the container is set up to use node-level storage unless XmlManager::setDefaultContainerConfig is used.

Parameters
txn name

The name provided here must be unique for the environment or an exception is thrown.



Errors

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


CONTAINER_EXISTS

Description: XmlManager::createContainer(XmlTransaction &txn, const std::string &name, const XmoContaienrConfig &flags, XmlContainer::ContainerType type, int mode = 0)

Creates a container.

Parameters
txn name

The name provided here must be unique for the environment or an exception is thrown.

flags The flags parameter must be set to 0 or by bitwise inclusively OR'ing together one or more of the following values:
DB_CREATE DB_READ_UNCOMMITTED DB_EXCL DB_MULTIVERSION DB_NOMMAP DB_RDONLY DB_THREAD DBXML_CHKSUM DBXML_ENCRYPT DB_TXN_NOT_DURABLE DBXML_INDEX_NODES DBXML_NO_INDEX_NODES DBXML_STATISTICS DBXML_NO_STATISTICS DBXML_TRANSACTIONAL DBXML_ALLOW_VALIDATION

Note that regardless the setting of your flags, XmlContainerConfig::setAllowCreate and XmlContainerConfig::setExclusiveCreate will be set to true.

type The container type must be one of the following values:
XmlContainer::NodeContainer XmlContainer::WholedocContainer
The default is XmlContainer::NodeContainer. config mode

Errors

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


CONTAINER_EXISTS

INVALID_VALUE

APIRef

Copyright (c) 1996-2009 Oracle. All rights reserved.