Changes

Jump to navigation Jump to search
249 bytes added ,  00:50, 27 June 2016
no edit summary
All functions in this module are assigned to the <code><nowiki>http://basex.org/modules/jobs</nowiki></code> namespace, which is statically bound to the {{Code|jobs}} prefix. Errors will be bound to the same prefix.
 
=Functions=
 
==jobs:current==
 
{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|jobs:current||xs:string}}
|-
| '''Summary'''
|Returns the id of the current query job.
|}
 
==jobs:list==
 
{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|jobs:list||xs:string*}}
|-
| '''Summary'''
|Returns the ids of all jobs that are either being executed asynchronously, or that are still registered because their results have been cached.
|-
| '''Examples'''
|
* <code>jobs:list()</code> returns the same job id as [[#jobs:current|jobs:current]] if no other job is running.
* <code>jobs:list() ! jobs:stop(.)</code> stops and invalidates all asynchronous queries and results.
|}
 
==jobs:finished==
 
{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|jobs:finished|$id as xs:string|xs:boolean}}
|-
| '''Summary'''
|Indicates if the evaluation of a job with the specified query {{Code|$id}} has finished. If <code>true</code> is returned, the job has either finished, or the query id is unknown.
|}
 
==jobs:stop==
 
{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|jobs:stop|$id as xs:string|empty-sequence()}}
|-
| '''Summary'''
|Cancels the execution of a job with the specified {{Code|$id}}, or drops the cached result of a query. Unknown query ids are ignored.
|}
=Asynchronous Execution=
)
</pre>
|}
 
==jobs:finished==
 
{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|jobs:finished|$id as xs:string|xs:boolean}}
|-
| '''Summary'''
|Indicates if the evaluation of a query with the specified query {{Code|$id}} has finished. If <code>true</code> is returned, the query has finished, or the query id is unknown.
|}
 
==jobs:stop==
 
{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|jobs:stop|$id as xs:string|empty-sequence()}}
|-
| '''Summary'''
|Cancels the execution of a query with the specified query {{Code|$id}}, or drops the query result if it has already been executed. Nothing will happen if the query id is unknown.
|}
 
==jobs:list==
 
{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|jobs:list||xs:string*}}
|-
| '''Summary'''
|Returns the ids of all queries that are either being executed asynchronously, or that have been executed and the results of which have been cached.
|-
| '''Examples'''
|
* <code>jobs:list() ! jobs:stop(.)</code> stops and invalidates all asynchronous queries and results.
|}
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu