XmlContainer::deleteIndex

API Ref

#include <DbXml.hpp>

void XmlContainer::deleteIndex( const std::string &uri, const std::string &name, const std::string &index, XmlUpdateContext &context)

void XmlContainer::deleteIndex( XmlTransaction &txn, const std::string &uri, const std::string &name, const std::string &index, XmlUpdateContext &context)


Description: XmlContainer::deleteIndex

Deletes an index of the specified type for the named document node. This method is for convenience -- see XmlIndexSpecification::deleteIndex for more information.

Parameters

txn
If the operation is to be transaction-protected, the txn parameter is an XmlTransaction handle returned from XmlManager::createTransaction.
uri
The namespace of the node to be indexed. The default namespace is selected by passing an empty string for the namespace.
name
The name of the element or attribute node to be indexed.
index
A comma-separated list of strings that represent the indexing strategy. The strings must contain the following information in the following order:
unique-{path type}-{node type}-{key type}-{syntax}

where:

unique indicates that the indexed value is unique in the container. If this keyword does not appear on the index string, then the indexed value is not required to be unique in the container.

{path type} is either node or edge.

{node type} is one of element, attribute, or metadata. If metadata is specified, then {path type} must be node.

{key type} is one of presence, equality, or substring.

{syntax} identifies the type of information being indexed. It must be one of the following values:

  • none
  • base64Binary
  • boolean
  • date
  • dateTime
  • dayTimeDuration
  • decimal
  • double
  • duration
  • float
  • gDay
  • gMonth
  • gMonthDay
  • gYear
  • gYearMonth
  • hexBinary
  • string
  • time
  • yearMonthDuration
  • untypedAtomic

Note that if {key type} is presence, then {syntax} must be none or simply not specified.

For example, examples index strings are:

unique-node-element-presence
node-element-equality-string
edge-element-presence-none
node-element-equality-float
context
The XmlUpdateContext to use for this operation.

Errors

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

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

APIRef

Copyright (c) 1996,2007 Oracle. All rights reserved.