Changes

Jump to navigation Jump to search
51 bytes removed ,  15:32, 10 April 2019
no edit summary
</pre>
If the [[Options#DEFAULTDB{{Option|DEFAULTDB]] }} option is turned on, the path argument of the {{Code|fn:doc}} or {{Code|fn:collection}} function will first be resolved against the globally opened database.
Two more functions are available for retrieving information on database nodes:
* {{Code|doc("http://web.de")}}: retrieves the addressed URI and returns it as a main-memory document node.
* {{Code|doc("myfile.xml")}}: retrieves the given file from the file system and returns it as a main-memory document node. Note that updates to main-memory nodes are not automatically written back to disk unless the <code>[[Options#WRITEBACK{{Option|WRITEBACK]]</code> }} option is set.
* {{Code|collection("/path/to/docs")}}: returns a main-memory collection with all XML documents found at the addressed file path.
* Resources can be deleted via <code>[[Commands#DELETE|DELETE]]</code>.
The [[Options#AUTOFLUSH{{Option|AUTOFLUSH]] }} option can be turned off before ''bulk operations'' (i.e. before a large number of new resources is added to the database).
The [[Options#ADDCACHEIf {{Option|ADDCACHE]] option will first cache }} is enabled, the input will be cached before adding it is added to the database. This is helpful when the input documents to be added are expected to eat up consume too much main memory.
The following commands create an empty database, add two resources, explicitly flush data structures to disk, and finally delete all inserted data:
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu