You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I'm upgrading an app from existdb 4.11 to 6.2
Comparing database values with fn:current-dateTime() produces an error: XPTY0004.
Expected behavior
I'm not an expert in XSD1.1, but type promotion should be expectable in my eyes.
I don't have Saxon or BaseX.
To Reproduce
eval in eXide:
xqueryversion"3.1";
declarefunctionlocal:less($a as xs:string, $b as xs:dateTime) as xs:boolean
{
if ($a="")
thentrue()
elsexs:dateTime($a) <= $b
};
local:less("2024-01-01T00:00:00Z", fn:current-dateTime())
Hi @pherk!
Thank you for opening this issue. While the coercion from xs:dateTimestamp to xs:dateTimeis done for the function parameter, the comparison fails.
It is a type error if, during the static analysis phase, an expression is found to have a static type that is not appropriate for the context in which the expression occurs, or during the dynamic evaluation phase, the dynamic type of a value does not match a required type as specified by the matching rules in 2.5.4 SequenceType Matching. Type error: cannot compare xs:dateTime to xs:dateTimeStamp
Describe the bug
I'm upgrading an app from existdb 4.11 to 6.2
Comparing database values with fn:current-dateTime() produces an error: XPTY0004.
Expected behavior
I'm not an expert in XSD1.1, but type promotion should be expectable in my eyes.
I don't have Saxon or BaseX.
To Reproduce
eval in eXide:
or eval
Context (please always complete the following information)
Additional context
conf.xml
?The text was updated successfully, but these errors were encountered: