XQuery Function Documentation
http://exist-db.org/xquery/xmldb
java:org.exist.xquery.functions.xmldb.XMLDBModule
A module for database manipulation functions.
xmldb:login #3
xmldb:login ($collection-uri as xs:string, $user-id as xs:string?, $password as xs:string?) as xs:booleanLogin the user, $user-id, and set it as the owner of the currently executing XQuery. Collection URIs can be specified either as a simple collection path or an XMLDB URI. It returns true if the authentication succeeds, false otherwise. If called from a HTTP context the login is cached for the lifetime of the HTTP session and may be used for any XQuery run in that session. If an HTTP session does not already exist, none will be created.
- Parameters:
$collection-uri The collection URI $user-id The user-id $password The password - Returns:
- xs:boolean : true() on successful authentication and owner elevation, false() otherwise
xmldb:login #4
xmldb:login ($collection-uri as xs:string, $user-id as xs:string?, $password as xs:string?, $create-session as xs:boolean?) as xs:booleanLogin the user, $user-id, and set it as the owner of the currently executing XQuery. Collection URIs can be specified either as a simple collection path or an XMLDB URI. It returns true() if the authentication succeeds, false() otherwise. If called from a HTTP context the login is cached for the lifetime of the HTTP session and may be used for any XQueryrun in that session. $create-session specifies whether to create an HTTP session on successful authentication or not. If $create-session is false() or the empty sequence no session will be created if one does not already exist.
- Parameters:
$collection-uri The collection URI $user-id The user-id $password The password $create-session whether to create the session or not on successful authentication, default false() - Returns:
- xs:boolean : true() on successful authentication and owner elevation, false() otherwise
http://exist-db.org/xquery/scheduler
java:org.exist.xquery.modules.scheduler.SchedulerModule
A module for scheduling jobs using the Quartz Scheduler
scheduler:schedule-xquery-cron-job #3
scheduler:schedule-xquery-cron-job ($xquery-resource as xs:string, $cron-expression as xs:string, $job-name as xs:string) as xs:booleanSchedules the named XQuery resource (e.g. /db/foo.xql) according to the Cron expression. XQuery job's will be launched under the guest account initially, although the running XQuery may switch permissions through calls to xmldb:login(). The job will be registered using the job name. Jobs submitted via this function are transitory and will be lost on a server restart. To ensure the persistence of scheduled tasks add them to the conf.xml file.
- Parameters:
$xquery-resource The path to the XQuery resource $cron-expression The cron expression. Please see the scheduler documentation. $job-name The name of the job. - Returns:
- xs:boolean : a flag indicating successful execution
scheduler:schedule-xquery-cron-job #4
scheduler:schedule-xquery-cron-job ($xquery-resource as xs:string, $cron-expression as xs:string, $job-name as xs:string, $job-parameters as element()?) as xs:booleanSchedules the named XQuery resource (e.g. /db/foo.xql) according to the Cron expression. XQuery job's will be launched under the guest account initially, although the running XQuery may switch permissions through calls to xmldb:login(). The job will be registered using the job name. The final argument can be used to specify parameters for the job, which will be passed to the query as external variables. Parameters are specified in an XML fragment with the following structure: <parameters><param name="param-name1" value="param-value1"/></parameters> Jobs submitted via this function are transitory and will be lost on a server restart. To ensure the persistence of scheduled tasks add them to the conf.xml file.
- Parameters:
$xquery-resource The path to the XQuery resource $cron-expression A cron expression. Please see the scheduler documentation. $job-name The name of the job. $job-parameters XML fragment with the following structure: <parameters><param name="param-name1" value="param-value1"/></parameters> - Returns:
- xs:boolean : Flag indicating successful execution
scheduler:schedule-xquery-cron-job #5
scheduler:schedule-xquery-cron-job ($xquery-resource as xs:string, $cron-expression as xs:string, $job-name as xs:string, $job-parameters as element()?, $unschedule as xs:boolean) as xs:booleanSchedules the named XQuery resource (e.g. /db/foo.xql) according to the Cron expression. XQuery job's will be launched under the guest account initially, although the running XQuery may switch permissions through calls to xmldb:login(). The job will be registered using the job name. The job parameters argument can be used to specify parameters for the job, which will be passed to the query as external variables. Parameters are specified in an XML fragment with the following structure: <parameters><param name="param-name1" value="param-value1"/></parameters> Jobs submitted via this function are transitory and will be lost on a server restart. To ensure the persistence of scheduled tasks add them to the conf.xml file.
- Parameters:
$xquery-resource The path to the XQuery resource $cron-expression A cron expression. Please see the scheduler documentation. $job-name The name of the job. $job-parameters XML fragment with the following structure: <parameters><param name="param-name1" value="param-value1"/></parameters> $unschedule Specifies whether to unschedule this job if an XPathException is raised, default is true. - Returns:
- xs:boolean : Flag indicating successful execution
scheduler:schedule-xquery-periodic-job #6
scheduler:schedule-xquery-periodic-job ($xquery-resource as xs:string, $period as xs:integer, $job-name as xs:string, $job-parameters as element()?, $delay as xs:integer, $repeat as xs:integer) as xs:booleanSchedules the named XQuery resource (e.g. /db/foo.xql) according to the period. XQuery job's will be launched under the guest account initially, although the running XQuery may switch permissions through calls to xmldb:login(). The job will be registered using the job name. The job parameters argument can be used to specify parameters for the job, which will be passed to the query as external variables. Parameters are specified in an XML fragment with the following structure: <parameters><param name="param-name1" value="param-value1"/></parameters>, Given the delay passed and the repeat value. Jobs submitted via this function are transitory and will be lost on a server restart. To ensure the persistence of scheduled tasks add them to the conf.xml file.
- Parameters:
$xquery-resource The path to the XQuery resource $period Time in milliseconds between execution of the job $job-name The name of the job. $job-parameters XML fragment with the following structure: <parameters><param name="param-name1" value="param-value1"/></parameters> $delay Can be used with a period in milliseconds to delay the start of a job. $repeat Number of times to repeat the job after the initial execution. A value of -1 means repeat forever. - Returns:
- xs:boolean : Flag indicating successful execution
scheduler:schedule-xquery-periodic-job #7
scheduler:schedule-xquery-periodic-job ($xquery-resource as xs:string, $period as xs:integer, $job-name as xs:string, $job-parameters as element()?, $delay as xs:integer, $repeat as xs:integer, $unschedule as xs:boolean) as xs:booleanSchedules the named XQuery resource (e.g. /db/foo.xql) according to the period. XQuery job's will be launched under the guest account initially, although the running XQuery may switch permissions through calls to xmldb:login(). The job will be registered using the job name. The job parameters argument can be used to specify parameters for the job, which will be passed to the query as external variables. Parameters are specified in an XML fragment with the following structure: <parameters><param name="param-name1" value="param-value1"/></parameters>, Given the delay passed and the repeat value. Jobs submitted via this function are transitory and will be lost on a server restart. To ensure the persistence of scheduled tasks add them to the conf.xml file.
- Parameters:
$xquery-resource The path to the XQuery resource $period Time in milliseconds between execution of the job $job-name The name of the job. $job-parameters XML fragment with the following structure: <parameters><param name="param-name1" value="param-value1"/></parameters> $delay Can be used with a period in milliseconds to delay the start of a job. $repeat Number of times to repeat the job after the initial execution. A value of -1 means repeat forever. $unschedule Specifies whether to unschedule this job if an XPathException is raised, default is true. - Returns:
- xs:boolean : Flag indicating successful execution