Difference between revisions of "Repository Module"
Jump to navigation
Jump to search
(3 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
=Conventions= | =Conventions= | ||
− | |||
− | |||
All functions and errors in this module are assigned to the <code><nowiki>http://basex.org/modules/repo</nowiki></code> namespace, which is statically bound to the {{Code|repo}} prefix.<br/> | All functions and errors in this module are assigned to the <code><nowiki>http://basex.org/modules/repo</nowiki></code> namespace, which is statically bound to the {{Code|repo}} prefix.<br/> | ||
Line 31: | Line 29: | ||
|- | |- | ||
| '''Summary''' | | '''Summary''' | ||
− | |Deletes a package. The parameter {{Code|$pkg}} indicates | + | |Deletes a package. The parameter {{Code|$pkg}} indicates the package name, optionally suffixed with a dash and the package version.<br /> |
|- | |- | ||
| '''Errors''' | | '''Errors''' | ||
Line 49: | Line 47: | ||
=Errors= | =Errors= | ||
− | |||
− | |||
{| class="wikitable" width="100%" | {| class="wikitable" width="100%" | ||
Line 79: | Line 75: | ||
;Version 9.0 | ;Version 9.0 | ||
− | * Updated: error codes | + | * Updated: error codes updated; errors now use the module namespace |
;Version 7.2.1 | ;Version 7.2.1 |
Revision as of 13:11, 24 May 2018
This XQuery Module contains functions for installing, listing and deleting modules contained in the Repository.
Contents
Conventions
All functions and errors in this module are assigned to the http://basex.org/modules/repo
namespace, which is statically bound to the repo
prefix.
Functions
repo:install
Signatures | repo:install($path as xs:string) as empty-sequence() |
Summary | Installs a package or replaces an existing package. The parameter $path indicates the path to the package. |
Errors | not-found : a package does not exist.descriptor : the package descriptor is invalid.installed : the module contained in the package to be installed is already installed as part of another package.parse : an error occurred while parsing the package.version : the package version is not supported.
|
repo:delete
Signatures | repo:delete($pkg as xs:string) as empty-sequence() |
Summary | Deletes a package. The parameter $pkg indicates the package name, optionally suffixed with a dash and the package version. |
Errors | not-found : a package does not exist.delete : the package cannot be deleted.
|
repo:list
Signatures | repo:list() as element(package)* |
Summary | Lists the names and versions of all currently installed packages. |
Errors
Code | Description |
---|---|
delete
|
The package cannot be deleted because of dependencies, or because files are missing. |
descriptor
|
The package descriptor is invalid. |
installed
|
The module contained in the package to be installed is already installed as part of another package. |
not-found
|
A package does not exist. |
parse
|
An error occurred while parsing the package. |
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
- Updated: repo:install: existing packages will be replaced
- Updated: repo:delete: remove specific version of a package
- Version 7.2
- Updated: repo:list now returns nodes
The module was introduced with Version 7.1.