Hi Marc,
As one XQuery expression is one transaction, the best approach is to define your operations in a single query. If you call db:create, an existing database will be overwritten, and the function allows you to specify some initial input.
Hope this helps, Christian
On Wed, Aug 8, 2018 at 10:31 PM Marc Coenegracht marc@crosseyed.nl wrote:
Hi,
A CMS occasionally recreates some existing databases of a production site. The databases are deleted and again created with the new content within a few seconds.
What happens if a read operation is taking place during this process? Can it cause problems with the recreation of the DB or with the BaseX server instance?
Of course it is possible to update the databases instead, but this process is a lot simpler and probably faster too.
All operations are executed running xquery scripts with REST using the BaseX http server.
Marc