Main Page » XQuery » Functions » Repository Functions

Repository Functions

This module contains functions for installing, listing and deleting modules contained in the Repository.

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

Signature
repo:install(
  $href  as xs:string
) as empty-sequence()
SummaryRetrieves and installs a package from the given $href location. Existing packages are replaced.
Errors
descriptorThe package descriptor is invalid.
installedThe module contained in the package to be installed is already installed as part of another package.
not-foundA package does not exist.
parseAn error occurred while parsing the package.
versionThe package version is not supported.

repo:delete

Signature
repo:delete(
  $package  as xs:string
) as empty-sequence()
SummaryDeletes a $package. The argument contains the package name, optionally suffixed with a dash and the package version.
Errors
deleteThe package cannot be deleted because of dependencies, or because files are missing.
not-foundA package does not exist.

repo:list

Signature
repo:list() as element(package)*
SummaryLists the names and versions of all currently installed packages.

Errors

CodeDescription
deleteThe package cannot be deleted because of dependencies, or because files are missing.
descriptorThe package descriptor is invalid.
installedThe module contained in the package to be installed is already installed as part of another package.
not-foundA package does not exist.
parseAn error occurred while parsing the package.
versionThe 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.2Version 7.1
  • Added: New module added.

⚡Generated with XQuery