A RESTful browser for eXist Java-Based Function Modules


http://exist-db.org/xquery/system
A module for retrieving information about eXist and the system.

system:as-user($username as xs:string, $password as xs:string?, $code-block as item()*) item()*
A pseudo-function to execute a limited block of code as a different user. The first argument is the name of the user, the second is the password. If the user can be authenticated, the function will execute the code block given in the third argument with the permissions of that user andreturns the result of the execution. Before the function completes, it switches the current user back to the old user.
$usernameThe username of the user to run the code against
$passwordThe password of the user to run the code against
$code-blockThe code block to run as the identified user

Returns the results of the code block executed

system:clear-trace() empty()
Clear the global trace log.

system:count-instances-active() xs:integer
Returns the number of eXist instances that are active.

Returns the count

system:count-instances-available() xs:integer
Returns the number of eXist instances that are available.

Returns the count

system:count-instances-max() xs:integer
Returns the maximum number of eXist instances.

Returns the count

system:enable-tracing($enable as xs:boolean) empty()
Enable function tracing on the database instance.
$enableThe boolean flag to enable/disable function tracing

system:enable-tracing($enable as xs:boolean, $tracelog as xs:boolean) empty()
Enable function tracing on the database instance.
$enableThe enable boolean flag to enable/disable function tracing
$tracelogThe tracelog boolean flag: if set to true, entering/exiting a function will be logged to the logger 'xquery.profiling'

system:ft-index-lookup($nodes as node()*, $string-filter as xs:string?) node()*
Internal function doing old full-text index lookup filtering. Intended to support the query optimizer by allowing restrictive filtering early on.
$nodesThe nodes
$string-filterThe string-filter

Returns the nodes matching the string-filter

system:get-build() xs:string
Returns the build of eXist running this query.

Returns the build number

system:get-exist-home() xs:string
Returns the eXist home location.

Returns the path to the eXist home

system:get-index-statistics() node()?
Internal function

Returns the resource containing the index statistics

system:get-memory-free() xs:long
Returns the amount of free memory available to eXist.

Returns the size of memory

system:get-memory-max() xs:long
Returns the maximum amount of memory eXist may use.

Returns the size of memory

system:get-memory-total() xs:long
Returns the total amount of memory in use by eXist.

Returns the size of memory

system:get-module-load-path() xs:string
Returns the module load path from the current query context. The module load path corresponds to the location on the file system from where modules are loaded into an XQuery. This is usually the directory from which the main XQuery was compiled, or - when executing a stored XQuery - the collection in which the main query resides. The module load path is also used to resolve relative XInclude paths.

Returns the load path

system:get-revision() xs:string
Returns the SubVersion (SVN) revision ID of eXist running this query.

Returns the revision ID.

system:get-running-jobs() item()
Get a list of running jobs (dba role only).

Returns the list of running jobs

system:get-running-xqueries() item()
Get a list of running XQueries (dba role only).

Returns a node containing the list of running XQueries

system:get-scheduled-jobs() item()
Get a list of scheduled jobs (dba role only).

Returns a node containing the list of scheduled jobs

system:get-version() xs:string
Returns the version of eXist running this query.

Returns the version string

system:kill-running-xquery($xquery-id as xs:integer) empty()
Kill a running XQuey (dba role only).
$xquery-idThe XQuery ID obtained from get-running-xqueries()

system:kill-running-xquery($xquery-id as xs:integer, $wait-time as xs:long) empty()
Kill a running XQuey (dba role only).
$xquery-idThe XQuery ID obtained from get-running-xqueries()
$wait-timeThe wait time in milliseconds before terminating the XQuery

system:restore($dir-or-file as xs:string, $admin-pass as xs:string?, $new-admin-pass as xs:string?) node()
Restore the database or a section of the database (admin user only).
$dir-or-fileThis is either a backup directory with the backup descriptor (__contents__.xml) or a backup ZIP file.
$admin-passThe password for the admin user
$new-admin-passSet the admin password to this new password.

Returns the restore results

system:shutdown($delay as xs:long) empty()
Shutdown eXist. This method is only available to the DBA role.
$delayThe delay in milliseconds before eXist starts to shutdown.

system:shutdown() empty()
Shutdown eXist immediately. This method is only available to the DBA role.

system:trace() node()
Returns function call statistics gathered by the trace log.

Returns the call statistics gathered by the trace

system:tracing-enabled() xs:boolean
Returns true if function tracing is currently enabled on the database instance.

Returns true is tracing is enabled.

system:trigger-system-task($java-classname as xs:string, $task-parameters as node()?) empty()
Trigger a system task.
$java-classnameThe full name of the Java class to execute. It must implement org.exist.storage.SystemTask
$task-parametersThe XML fragment with the following structure: <parameters><param name="param-name1" value="param-value1"/></parameters>

system:update-statistics() empty()
This function is part of the unfinished index statistics module, which is not yet usable in a normal eXist setup. update-statistics rebuilds index statistics for the entire database.
Return to list of all modules