Changes

Jump to navigation Jump to search
1,741 bytes added ,  23:57, 25 May 2012
no edit summary
This [[Module Library|XQuery Module]] provides functions for displaying information stored in the database index structures. All functions are introduced with the {{Mono|index:}} prefix, which is linked to the statically declared {{Mono|http://basex.org/modules/index}} namespace.
=Conventions=
| valign='top' | '''Summary'''
|Returns information about possible facets and facet values on a database in document structure format.<br/>If {{Mono|$type}} is specified as {{Mono|flat}}, the function returns this information in a flat summarized version.
|-
|'''[[Database Module#Errors|BXDB0001]]''' is raised if {{Mono|$db}} references a node that is not stored in a database (i.e., references a main-memory XML fragment).<br/>'''[[Database Module#Errors|BXDB0002]]''' is raised if the addressed database cannot be opened.<br/>'''[[Database Module#Errors|BXDB0004]]''' is raised if the index required by a function is not available.
 
|-
| valign='top' | '''Examples'''
| valign='top' | '''Summary'''
|Returns all strings stored in the text index, along with their number of occurrences.<br/>If {{Mono|$prefix}} is specified, the returned nodes will be refined to the strings starting with that prefix.
|-|'''[[Database Module#Errors|BXDB0001]]''' is raised if {{Mono|$db}} references a node that is not stored in a database (i.e., references a main-memory XML fragment).<br/>'''[[Database Module#Errors|BXDB0002]]''' is raised if the addressed database cannot be opened.<br/>'''[[Database Module#Errors|BXDB0004]]''' is raised if the index required by a function is not available.|}
==index:attributes==
| valign='top' | '''Summary'''
|Returns all strings stored in the attribute index, along with their number of occurrences.<br/>If {{Mono|$prefix}} is specified, the returned nodes will be refined to the strings starting with that prefix.
|-|'''[[Database Module#Errors|BXDB0001]]''' is raised if {{Mono|$db}} references a node that is not stored in a database (i.e., references a main-memory XML fragment).<br/>'''[[Database Module#Errors|BXDB0002]]''' is raised if the addressed database cannot be opened.<br/>'''[[Database Module#Errors|BXDB0004]]''' is raised if the index required by a function is not available.|}
==index:element-names==
| valign='top' | '''Summary'''
|Returns all element names stored in the index, along with their number of occurrences.
|-|'''[[Database Module#Errors|BXDB0001]]''' is raised if {{Mono|$db}} references a node that is not stored in a database (i.e., references a main-memory XML fragment).<br/>'''[[Database Module#Errors|BXDB0002]]''' is raised if the addressed database cannot be opened.<br/>'''[[Database Module#Errors|BXDB0004]]''' is raised if the index required by a function is not available.|}
==index:attribute-names==
| valign='top' | '''Summary'''
|Returns all attribute names stored in the index, along with their number of occurrences.
|-|'''[[Database Module#Errors|BXDB0001]]''' is raised if {{Mono|$db}} references a node that is not stored in a database (i.e., references a main-memory XML fragment).<br/>'''[[Database Module#Errors|BXDB0002]]''' is raised if the addressed database cannot be opened.<br/>'''[[Database Module#Errors|BXDB0004]]''' is raised if the index required by a function is not available.|}
=Changelog=
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu