Changes

Jump to navigation Jump to search
825 bytes added ,  21:52, 19 July 2022
no edit summary
BaseX 10 requires Java 11 or later to run. Databases created with BaseX 10 are backward compatible and can still be opened with BaseX 9.
 
=Applications=
 
The following modifications might be relevant when migrating existing applications:
 
* The default ports for web applications have been changed from 8984/8985 to 8080/8081.
* If a new application of BaseX is deployed, the {{Code|admin}} user can only be used after a custom password has been assigned, e.g., via the {{Command|PASSWORD}} command.
* The <code>IGNOREHOSTNAME</code> option was dropped and merged with {{Option|IGNORECERT}}.
* The conventions for functions in [[Clients]] in other programming languages were revised.
=Storage=
==Value Resources==
In addition to XML and binary resources, a third resource type has been added: XQuery values (atomic items and nodes, sequences, maps, arrays) can now be stored in databases as well. The {{Function|Database|db:put-value}} and {{Function|Database|db:get-value}} can be used to store to and retrieve values.
The new feature can e.g. be used to store maps in a database:
<syntaxhighlight lang="xquery">
db:put-value(
'factbook',
map:merge(
for $country in db:openget('factbook')//country
return map:entry($country/@name, $country//city/name ! string())
),
<syntaxhighlight lang="xquery">
let $cities := db:get-value('factbook', 'cities')
for $country in ('Japan', 'Indonesia', 'Malaysia')
return $country || ': ' || string-join($cities?($country), ', ')
The [[Commands#Backups|Backup Commands]] and [[Database_Module#Backups|Backup Functions]] were enhanced to back up general data: [[User Management|registered users]], [[Jobs Module#Services|scheduled services]], [[Store Module|key-value stores]].
=Applications= The default port for web applications has been changed from {{Code|8984}} to {{Code|8080}}. If a new application of BaseX is deployed, the {{Code|admin}} user can only be used after a custom password has been assigned, e.g., via the {{Command|PASSWORD}} command. The <code>IGNOREHOSTNAME</code> option was dropped and merged with {{Option|IGNORECERT}}. =Graphical User InterfaceCommands=
The graphical user interface of BaseX has following commands have been revised and made more consistent.:
The icons were replaced by scalable ones, building upon the [https* Added://openjdk{{Command|GET}}: Retrieves a single XML document.org/jeps/263 HiDPI graphics support for Windows * Added: {{Command|DIR}}: Lists directories and Linux]resources.* Renamed: {{Code|GET}} → {{Command|SHOW OPTIONS}}* Renamed: {{Code|STORE}} → {{Command|BINARY PUT}}* Renamed: {{Code|RETRIEVE}} → {{Command|BINARY GET}}* Renamed: {{Code|REPLACE}} → {{Command|PUT}}
=XQuery=
<syntaxhighlight lang="xquery">
declare variable $n external;
db:openget('names-' || $n)
</syntaxhighlight>
After the query has been parsed, a user-specific value (e.g., {{Code|123}}) will be bound to {{Code|$n}}. The variable will be inlined by the compiler, and the argument of {{CodeFunction||db:openget}} will be pre-evaluated to {{Code|names123}}. It is then easy for the lock detector to collect the name of the database that needs to read-locked before the query is eventually executed.
Another positive side effect of two-step compilation is that productive environments get faster in general: Queries can be compiled in parallel, and it’s only the optimization and evaluation of a query that may need to be delayed by locking.
* [[Database Module]]:
** Added: {{Function|Database|db:put-value}}, {{Function|Database|db:get-value}}.** {{Code|db:open}}/{{Code|db:open-id}}/{{Code|db:open-pre}} → {{Function|Database|db:get}}/{{Function|Database|db:get-id}}/{{Function|Database|db:get-pre}}** {{Code|db:replace }} → {{Function|Database|db:updateput}}: Second and third arguments have been swapped.** {{Code|db:store }} → {{Function|Database|db:put-binary}}: Second and third arguments have been swapped.** {{Code|db:retrieve }} → {{Function|Database|db:get-binary}}** {{Code|db:is-raw}}/{{Code|db:is-xml }} → {{Function|Database|db:type}}
* [[Fetch Module]]:
** {{Code|fetch:xml }} → {{Function|Database|fetch:doc}}** {{Code|fetch:xml-binary }} → {{Function|Database|fetch:binary-doc}}
* The Jobs Module has been renamed to [[Job Module]].
* The Strings Module has been renamed to [[String Module]].
* The deprecated ZIP Module has and the Geo Module have been removed.
Functions of all modules, excluding the [[File Module]], now consistently resolve relative URI references against the static base URI, and not the current working directory.
* <code>fn:doc</code> and <code>fn:collection</code>;
* the {{Command|CREATE DB}} and {{Command|REPO INSTALL}} commands.
 
=[[REST]]=
 
Results in the {{Code|rest}} namespace are now returned unprefixed:
 
<syntaxhighlight lang="xml">
<!-- before -->
<rest:databases xmlns:rest="http://basex.org/rest"/>
 
<!-- before -->
<databases xmlns="http://basex.org/rest"/>
</syntaxhighlight>
 
When listing the resources of a database, {{Code|dir}} elements are returned for resources that are located in subdirectories.
=Catalogs=
</syntaxhighlight>
=[[REST]]Graphical User Interface=
Results in the {{Code|rest}} namespace are now returned unprefixed:The graphical user interface of BaseX has been revised and made more consistent.
<syntaxhighlight lang="xml"><!-- before --><rest:databases xmlns:rest="http://basex.org/rest"/> <!-- before --><databases xmlns="httpThe icons were replaced by scalable ones, building upon the [https://basexopenjdk.org/rest"jeps/></syntaxhighlight> When listing the resources of a database, {{Code|dir}} elements are returned 263 HiDPI graphics support for resources that are located in subdirectoriesWindows and Linux].
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu