Changes

Jump to navigation Jump to search
197 bytes removed ,  13:11, 24 May 2018
no edit summary
This module contains [[Querying#FunctionsModule Library|XQuery functionsModule]] contains functions for managing installing, listing and deleting modules contained in the [http://expath.org/modules/pkg/ EXPath packages[Repository]].  =Conventions= All functions and errors in this module are preceded by the <code>repo:</code> prefix which is linked assigned to the namespace <code><nowiki>http://basex.org/modules/repo</nowiki></code>. You can read more about BaseX implementation of namespace, which is statically bound to the EXPath Packaging API [[Packaging{{Code|here]]repo}} prefix.<br/>
=Functions=
 
==repo:install==
 {|width='100%'
|-
| valign='top' width='90120' | '''Signatures'''|<code><b>{{Func|repo:install</b>(|$path as xs:string) as |empty-sequence()</code>}}<br />
|-
| valign='top' | '''Summary'''|Installs a package or replaces an existing package. The parameter <code>{{Code|$path</code> }} indicates the path to the package.<br />
|-
| valign='top' | '''Errors'''|<b>[[XQuery Errors{{Error|not-found|#Packaging Errors|PACK0001]]</b> is raised if the }} a package does not exist.<br /><b>[[XQuery Errors#Packaging Errors{{Error|PACK0002]]</b> is raised if the package is already installed.<br /><b>[[XQuery Errors#Packaging Errorsdescriptor|PACK0003]]</b> is raised if the package to be installed requires a package which is still not installed.<br /><b>[[XQuery Errors#Packaging Errors|PACK0004]]</b> is raised if }} the package descriptor is invalid.<br /><b>[[XQuery Errors{{Error|installed|#Packaging Errors|PACK0005]]</b> is raised if }} the module contained in the package to be installed is already installed as part of another package.<br /><b>[[XQuery Errors{{Error|parse|#Packaging Errors|PACK0006]]</b> is raised if }} an error occurred while parsing the package cannot be parsed.<br /><b>[[XQuery Errors{{Error|version|#Packaging Errors|PACK0009]]</b> is raised if }} the package version is not supported.<br /><b>[[XQuery Errors#Packaging Errors|PACK0010]]</b> is raised if the package contains an invalid JAR descriptor.<br /><b>[[XQuery Errors#Packaging Errors|PACK0011]]</b> is raised if the package contains a JAR descriptor but it cannot be read.<br />
|}
==repo:delete==
 {|width='100%'
|-
| valign='top' width='90120' | '''Signatures'''|<code><b>{{Func|repo:delete</b>(|$pkg as xs:string) as |empty-sequence()</code>}}<br />
|-
| valign='top' | '''Summary'''|Deletes a package. The parameter <code>{{Code|$pkg</code> }} indicates either the package name as specified in the package descriptor or the name of the directory where , optionally suffixed with a dash and the package is installedversion.<br />
|-
| valign='top' | '''Errors'''|<b>[[XQuery Errors{{Error|not-found|#Packaging Errors|PACK0007]]</b> is raised if the }} a package cannot be deleteddoes not exist.<br /><b>[[XQuery Errors{{Error|delete|#Packaging Errors|PACK0008]]</b> is raised if another package depends on }} the package to cannot be deleted.<br />
|}
==repo:list==
 {|width='100%'
|-
| valign='top' width='90120' | '''Signatures'''|<code><b>{{Func|repo:list</b>() as ||element(package)*</code>}}<br />
|-
| valign='top' | '''Summary'''
|Lists the names and versions of all currently installed packages.<br />
|}
=Recent ChangesErrors{| class="wikitable" width="100%"! width="110"|Code|Description|-|{{Code|delete}}|The package cannot be deleted because of dependencies, or because files are missing.|-|{{Code|descriptor}}|The package descriptor is invalid.|-|{{Code|installed}}|The module contained in the package to be installed is already installed as part of another package.|-|{{Code|not-found}}|A package does not exist.|-|{{Code|parse}}|An error occurred while parsing the package.|-|{{Code|version}}|The package version is not supported.|} =Changelog= ;Version 9.0 * Updated: error codes updated; errors now use the module namespace
==;Version 7.2.1.2==
* Updated: {{Mono[[#repo:install|repo:install]]: existing packages will be replaced* Updated: [[#repo:delete|repo:list()}} now returns nodesdelete]]: remove specific version of a package
=Recent Changes=;Version 7.2
The module was introduced with {{Version* Updated: [[#repo:list|7.1}}.repo:list]] now returns nodes
[[Category:XQuery]]The module was introduced with Version 7.1.
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu