Changes

Jump to navigation Jump to search
168 bytes added ,  17:39, 1 August 2022
no edit summary
''Draft, yet to be finalized'' -------- After 15 years of continuous development, the first double-digit version of BaseX is about to see sees the light of day soon.
We have taken the version jump as an opportunity to perform some major refactorings of BaseX, both under the hood and on API and XQuery level. Before migrating your projects to the new version, some adjustments may be required, so please read this article carefully.
SERIALIZER: indent=yes
</syntaxhighlight>
 
In the GUI editor, a [[Shortcuts#Editor Shortcuts|shortcut]] and an icon were added to switch result indentation on and off.
In addition, databases may considerably increase in size, as whitespaces used for indenting an XML document will be interpreted and stored as additional text nodes. If your XML resources are structured and have no [[Full-Text#Mixed Content|mixed content]], it is advisable to enable whitespaces stripping when importing them to a database.
==Compilation==
Several The compilation has been split up into multiple steps to improve locking. So far, several internal steps are were already performed when executing a query is executed (see [[XQuery Optimizations#Introduction|XQuery Optimizations]] for more details):
# The query is parsed, i.e., the original query string is transformed to an executable tree representation.
# The query is compiled and evaluated.
The [[Transaction_Management|transaction manager]] gathers the names of the databases that will be accessed by a query. If it is not possible to uniquely identify all databases that may be opened by the query, global locking will be applied , and all databases will be locked. Detection can fail if the names of databases depend on external input. It can also fail if a query is too complex to associate character strings with database operations.
The compilation phase has now been split into comprises two separate steps:
# ''Compilation'' of logical, context-independent (static) operations. External values are bound to the query, and deterministic code is rewritten, simplified and pre-evaluated.# ''Optimization'' of physical, context-based (dynamic) operations. Databases are opened and checked for available indexes; current date/time is retrieved. The resulting code is further rewritten and optimized.
Lock detection will be performed after the first step, and the code resulting from this step offers much more insight into which specific databases need to be locked. As a result, local locks can be applied to many more queries than before, and many queries can now run in parallel. An example:
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu