dbxml:lookup*()

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

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.

The dbxml:lookup-index() extension function will lookup and return all elements with the name $elementName (and optionally parent $parentName) from the indices of the container named by $containerName. If appropriate indices 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.

The dbxml:lookup-attribute-index() extension function will return all attributes with the name $attribute (and optionally the parent, $parentName) from the indices of the container named by $containerName. If appropriate indices 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.

The dbxml:lookup-metadata-index() extension function will lookup and return the document nodes for documents that contain the metadata $metadataName from the indices of the container named by $containerName. If appropriate indices 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.