Re: [basex-talk] Set Operator Examples

2013-09-25 Thread Arve Gengelbach
Hej Arto, just being interested: How does it compare to a FLOWR expression? declare function local:difference-flowr($a, $b) { for $x in $a where not($x = $b) group by $x return $x[1] }; cheers Arve Am 25.09.13 07:22 schrieb Arto Viitanen: Question was about set operations in BaseX. I

Re: [basex-talk] feature request -- GUI database creation overall progress

2013-09-25 Thread Christian Grün
Any chance of getting, in addition to the per-file progress, the overall progress of creating the database? ...currently no, because we’re not counting all files before retrieving them (this can take quite a while when e.g. a network resource is addressed, or if a ZIP file from a remote URL is

Re: [basex-talk] Set Operator Examples

2013-09-25 Thread Arto Viitanen
-Original Message- From: Arve Gengelbach [mailto:a...@basex.org] Sent: 25. syyskuuta 2013 9:08 To: Arto Viitanen Cc: basex-talk@mailman.uni-konstanz.de Subject: Re: [basex-talk] Set Operator Examples Hej Arto, just being interested: How does it compare to a FLOWR expression? declare

Re: [basex-talk] Issue with linebreak using REST since 7.7.1

2013-09-25 Thread Christian Grün
Dear Yoann, I tried to reproduce your example, using the following query: $session = new Session(localhost, 1984, admin, admin); $xml = $session-execute(XQUERY xy//x); print $xml; $session-execute(XQUERY insert node $xml into xml/); $session-close(); This one runs without problems on my

Re: [basex-talk] BaseX http running single threaded?

2013-09-25 Thread France Baril
I'm having similar issues where everything freezes on an http request done from inside a restxq function, but only if certain conditions are present. The conditions are not easy to pinpoint. However, they affect our ability to validate content against modular dtds/xsds, to apply modular .xsl and

Re: [basex-talk] BaseX http running single threaded?

2013-09-25 Thread Joe Templeman
I found that it is locking up because of the database global lockhttp://docs.basex.org/wiki/Options#GLOBALLOCK which locks during any updating function. On the long updating call that was happening first, it was grabbing the lock and so every subsequent request was being blocked until the update

Re: [basex-talk] Set Operator Examples

2013-09-25 Thread Arve Gengelbach
Hej Arto, One can even improve your map2 by using the [Simple map operator]. declare function local:difference-map-2-excl($a, $b) { let $m2 := map:new($b ! map:entry(., true())) return $a ! (if($m2(.)) then () else .) }; - map 299.47 ms - map2 290.96 ms - map2 + ! 128.25 ms cheers Arve

Re: [basex-talk] Set Operator Examples

2013-09-25 Thread Andy Bunce
Hi, Nice work. I wonder if the BaseX query optimizer could not spot the idioms for the set operations and rewrite the query to something similar for the cases: distinct-values(($arg1, $arg2)) distinct-values($arg1[.=$arg2]) distinct-values($arg1[not(.=$arg2)]) From :

Re: [basex-talk] Set Operator Examples

2013-09-25 Thread Arto Viitanen
I had a typo in my example. The return did not call the map2 version. With it, the results were (now on 7.7 and Windows 7) - pred 58278.25 ms - map 272.68 ms - map2 74.27 ms - map2! 92.97 ms - flowr 43018.3 ms Hej Arto, One can even improve your map2 by using the [Simple map operator].