Berkeley DB XML Reference Guide:
Berkeley DB XML XQuery Extensions

PrevRefNext


dbxml:lookup-index($containerName as xs:string, $elementName as xs:string) as element()*

dbxml:lookup-index($containerName as xs:string, $elementName as xs:string, $parentName as xs:string) as element()*

dbxml:lookup-attribute-index($containerName as xs:string, $attributeName as xs:string) as attribute()*

dbxml:lookup-attribute-index($containerName as xs:string, $attributeName as xs:string, $parentName as xs:string) as attribute()*

dbxml:lookup-metadata-index($containerName as xs:string, $metadataName as xs:string) as document-node()*


Description:

The dbxml:lookup-* extension functions allow access to functions provided by the XmlIndexLookup class in the API. They can be used when very specific index lookups are required by a query, or the query plan is not sufficiently optimized for a given query.


Description: dbxml:lookup-index()

The dbxml:lookup-index() extension function will lookup and return all elements with the name $elementName (and optionally parent $parentName) from the indexes of the container named by $containerName. If appropriate indexes do not exist, the empty sequence is returned. An error is raised if the specified container cannot be opened. This function can be used to perform presence index lookups directly from a query. Value, range, and substring index lookups can be used by adding predicates to the function call.


Description: dbxml:lookup-attribute-index()

The dbxml:lookup-attribute-index() extension function will return all attributes with the name $attribute (and optionally the parent, $parentName) from the indexes of the container named by $containerName. If appropriate indexes do not exist, the empty sequence is returned. An error is raised if the specified container cannot be opened. This function can be used to perform presence index lookups for attributes directly from a query. Value, range, and substring index lookups can be used by adding predicates to the function call.


Description: dbxml:lookup-metadata-index()

The dbxml:lookup-metadata-index() extension function will lookup and return the document nodes for documents that contain the metadata $metadataName from the indexes of the container named by $containerName. If appropriate indexes do not exist, the empty sequence is returned. An error is raised if the specified container cannot be opened. This function can be used to perform presence index lookups for metadata directly from a query. Value, range, and substring index lookups can be used by adding predicates to the function call.

Parameters

$containerName
The name of the container in which the index lookup should occur. This can be a container alias.
$elementName
The name of the element for the index lookup. This is cast to xs:QName, resolving prefixes, if any, using the in scope namespace prefixes.
$parentName
The name of the parent element for the index lookup. This is cast to xs:QName, resolving prefixes, if any, using the in scope namespace prefixes.
$attributeName
The attribute to look up. This is cast to xs:QName, resolving prefixes, if any, using the in scope namespace prefixes.
$metadataName
The metadata item to look up. This is cast to xs:QName, resolving prefixes, if any, using the in scope namespace prefixes.

PrevRefNext

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