XmlManager::createIndexLookup

API Ref

#include <DbXml.hpp>

XmlIndexLookup XmlManager::createIndexLookup( XmlContainer &container, const std::string &uri, const std::string &name, const std::string &index, const XmlValue &value = XmlValue(), XmlIndexLookup::Operation op = XmlIndexLookup::EQ)


Description: XmlManager::createIndexLookup

Instantiates an new XmlIndexLookup object for performing index lookup operations. Only a single index may be specified, and substring indexes are not supported.

Parameters

container
The target container for the lookup operation.
uri
The namespace of the node to be used. The default namespace is selected by passing an empty string for the namespace.
name
The name of the element or attribute node to be used.
index
A string that represents the indexing strategy. The string 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 or equality.

{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
node-attribute-equality-decimal
edge-element-presence-none
value
The value to be used as the single value for an equality or inequality lookup, or as the lower bound of a range lookup. An empty value is specified using an uninitialized XmlValue object.
op
Selects the operation to be performed. Must be one of:
XmlIndexLookup::NONE
XmlIndexLookup::EQ
XmlIndexLookup::LT
XmlIndexLookup::LTE
XmlIndexLookup::GT
XmlIndexLookup::GTE

APIRef

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