Changes

Jump to navigation Jump to search
36 bytes removed ,  06:53, 29 November 2019
=Conventions=
{{Mark|Updated with Version 9.0:}} * The module will be available if the {{Code|basex-api}} package must be included library is found in the classpath. This is always the case if you use one of the complete distributions of BaseX (zip, exe, war) of BaseX.* All functions and errors are assigned to the <code><nowiki>http://basex.org/modules/session</nowiki></code> namespace. The module must be imported in , which is statically bound to the query prolog:<pre class="brush:xquery">import module namespace {{Code|session = "http://basex.org/modules/session";..}} prefix.</pre>
* If any of the functions is called outside the servlet context, <code>[[XQuery Errors#BaseX Errors|basex:http]]</code> is raised.
* As sessions are side-effecting operations, all functions are flagged as ''non-deterministic''. As a result, the functions some query optimizations will not be reordered by the compilersuppressed.
=Functions=
|-
| '''Summary'''
|Returns the names of all variables attributes bound to the current session.
|-
| '''Examples'''
==session:get==
 
{{Mark|Updated with Version 9.3:}} Values that have no XQuery type will be returned as strings.
{| width='100%'
|-
| '''Summary'''
|Returns the value of a session attribute with the specified <code>$name</code> bound to the current session. If the specified variable attribute is unknown, an empty sequence or the optionally specified default value is returned instead.|-| '''Errors'''|{{ErrorCode|get|#Errors$default}} the value of a session variable could not will be retrievedreturned instead.
|-
| '''Examples'''
|-
| '''Summary'''
|Binds the specified name/{{Code|$value pair }} to a the sessionattribute with the specified {{Code|$name}}.
|-
| '''Errors'''
|{{Error|set|#Errors}} a function item was specified as The supplied value of a session variablecannot be materialized.
|-
| '''Examples'''
|-
| '''Summary'''
|Deletes a session value bound to attribute with the specified <code>$name</code>.
|-
| '''Examples'''
=Errors=
 
{{Mark|Updated with Version 9.0:}}
{| class="wikitable" width="100%"
! width="110" |Code
|Description
|-
|{{Code|get}}
|The stored attribute is no XQuery value.
|-
|{{Code|set}}
|Function items The supplied value cannot be storedmaterialized.
|}
=Changelog=
 
;Version 9.3
 
* Updated: [[#session:get|session:get]]: Values that have no XQuery type will be returned as strings.
;Version 9.0
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu