Hi Sebastian,
The static type of the client:query function is fixed. A new snapshot is available [1].
Hope this helps, Christian
[1] https://files.basex.org/releases/latest/
On Mon, Aug 24, 2020 at 4:29 PM Wiemer, Sebastian < Sebastian.Wiemer@adesso.de> wrote:
Hi,
Thank you Christian for the new 9.4.2. release!
The function "f()" below will yield to the error: "Cannot promote item()? to xs:integer?: $result_4" This works in BaseX 9.1
declare function local:f() as xs:integer()*{ let $id := client:connect("localhost", 1984, "admin", "admin") let $result := client:query($id, "1,2") let $close := client:close($id) return $result };
local:f()
I guess, that unpredictable return types at compile time default to item()? instead of item()* and thus cannot be used in a function returning anything else but item()?
Has someone an idea for a solution/workaround for this?
Best regards, Sebastian
https://ki.adesso.de/de/erste-schritte/index.html?pk_campaign=KI%20Report&pk_source=Signatur&pk_medium=Banner
>>> business. people. technology. <<<
adesso SE mit Sitz in Dortmund Vorstand: Michael Kenfenheuer (Vors.), Dirk Pothen, Andreas Prenneis, Stefan Riedel, Jörg Schroeder Vorsitzender des Aufsichtsrates: Prof. Dr. Volker Gruhn Amtsgericht Dortmund HRB 20663