Relational Execute
In the special:relation console, you can execute changes to the database based on relations. The execution is always based on a query. The query must have some columns (_name or _revision) depending on the mode to ensure that the right pages are changed. No change is done as long as the query results in an overtime. The execute always previews the changes, and the change is limited to a batch of 1000 pages at once.
The following instructions are available
execute append
Appends new fields to a page based on the current relation. The columns _name and _revision must be present. If the status of the page is not “ok”, an error is returned. Meta fields of the header (eg _status) and virtual fields (eg _paragraph) are ignored.
execute delete
Deletes pages based on the current relation. The columns _name and _revision must be present. Protected and already deleted pages cannot be deleted.
execute insert
Inserts new pages based on all fields of the current relation. The column _name must be present, be unique and the page must not already exist (status “ok” or “protected”, but “deleted” is ok). Meta fields of the header (eg _status) and virtual fields (eg _paragraph) are ignored.
execute status
Returns the status of all pages with the columns _name, _revision and _status.
execute undelete
Undeletes deleted pages based on the current relation. The columns _name and _revision must be present. The operation reverts to the specified revision. Returns an error for protected and deleted pages.
execute update
Updates field values based on a relation. The columns _name and _revision must be present. If the status of the page is not “ok”, an error is returned. New fields can be added, but missing fields in the relation are not removed. Note that you can get unexpected results if the number of values for a field is variable.