BaseXdb / basex

BaseX Main Repository.
http://basex.org
BSD 3-Clause "New" or "Revised" License
661 stars 268 forks source link

Documentation for Job Module #2172

Closed nverwer closed 1 year ago

nverwer commented 1 year ago

Description of the Problem

The documentation for the Job Module says:

Updated with Version 10: Renamed from Jobs Module to Job Module. The namespace URI has been updated as well. This XQuery Module provides functions for organizing scheduled, queued, running and cached jobs. Jobs can be commands, queries, client, or HTTP requests.

However, it seems that in job:eval the $query parameter can only be (or refer to) an XQuery, not a command or request?

If my impression of what $query can be is wrong, how could I pass a command to job:eval?

Expected Behavior

Either mention in the documentation that $query can only be an XQuery, or show how job:eval can run commands.

Steps to Reproduce the Behavior

Try to execute the query

job:eval("CREATE DB testDB")

The database will not be created, and no error message appears in the log.

Do you have an idea how to solve the issue?

Either mention in the documentation that $query can only be an XQuery, or show how job:eval can run commands.

What is your configuration?

BaseX 10.3 Windows (and MacOS)

ChristianGruen commented 1 year ago

Thanks for the observation. job:eval is restricted to the scheduling of XQuery expressions; I have updated some sections of the article.