Changes

Jump to navigation Jump to search
174 bytes added ,  16:46, 5 December 2014
no edit summary
===Original Files===
In BaseX, all updates are performed on database nodes or in main memory. By default, update operations never affect the original input file(since {{Version|8.0}}, the info string "Updates are not written back" appears in the query info to indicate this). The following solutions exist to write XML documents and binary resources to disk:
* Updates on main-memory instances of files that have been retrieved via {{Code|fn:doc}} or {{Code|fn:collection}} will be propagated back to disk when the <code>[[Options#WRITEBACK|WRITEBACK]]</code> option is turned on. This option can also be activated on [[Command-Line Options#BaseX Standalone|command line]] via <code>-u</code>. Make sure you back up the original documents before running your queries.
* Functions like <code>[[#fn:put|fn:put]]</code> or <code>[[File Module#file:write|file:write]]</code> can be used to write single XML documents to disk. With <code>[[File Module#file:write-binary|file:write-binary]]</code>, you can write binary resources.
* The [[Commands#EXPORT|EXPORT]] command can be used write all resources of a databases to disk.
* Functions like <code>[[#fn:put|fn:put]]</code> or <code>[[File Module#file:write|file:write]]</code> can be used to write single XML documents to disk. With <code>[[File Module#file:write-binary|file:write-binary]]</code>, you can write binary resources.
* Updates on main-memory instances of files that have been retrieved via {{Code|fn:doc}} or {{Code|fn:collection}} will be propagated back to disk when the <code>[[Options#WRITEBACK|WRITEBACK]]</code> option is turned on. This option can also be activated on [[Command-Line Options#BaseX Standalone|command line]] via <code>-u</code>. Make sure you back up the original documents before running your queries.
===Indexes===
;Version 8.0
* Added: <code>MIXUPDATES</code> option for [[#Returning Results|Returning Results]] in updating expressions.</code>
* Added: information message if files are not written back
;Version 7.8
* Added: [[#update|update]] convenience operator
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu