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.
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.
system:enable-tracing($enable as xs:boolean, $tracelog as xs:boolean) empty()
Enable function tracing on the database instance.
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.
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()?
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).
system:kill-running-xquery($xquery-id as xs:integer, $wait-time as xs:long) empty()
Kill a running XQuey (dba role only).
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).
Returns the restore results
system:shutdown($delay as xs:long) empty()
Shutdown eXist. This method is only available to the DBA role.
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()
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.