Re: [basex-talk] jobs:eval as a service, "no variables allowed"

2019-04-03 Thread Zimmel, Daniel
Thanks for the clarification. This sound like a wise thing to do.

> -Ursprüngliche Nachricht-
> Von: Christian Grün [mailto:christian.gr...@gmail.com]
> Gesendet: Mittwoch, 3. April 2019 13:18
> An: Zimmel, Daniel
> Cc: BaseX
> Betreff: Re: [basex-talk] jobs:eval as a service, "no variables allowed"
> 
> Hi Daniel,
> 
> no variables can be bound if services are registered, that’s true
> (values that are bound to variables might potentially be huge, and
> blow up the initial startup time of BaseX). I have added a comment to
> our documentation.
> 
> Best,
> Christian
> 
> 
> On Wed, Apr 3, 2019 at 11:57 AM Zimmel, Daniel 
> wrote:
> >
> > Hi,
> >
> > when I try to register jobs:eval as a service, BaseX 9.2 says: "no variables
> allowed".
> >
> > Is it not possible to register a service with a variable?
> >
> > Not working:
> >
> > jobs:eval("declare variable $xml external; $xml",
> > map { 'xml': 'XML' },
> > map { 'id':'TEST', 'start':'11:31:50', 'interval':'P1D', 'service': true() 
> > })
> >
> > working:
> >
> > jobs:eval("declare variable $xml external; $xml",
> > map { 'xml': 'XML' },
> > map { 'id':'TEST', 'start':'11:31:50', 'interval':'P1D', 'service': false() 
> > })
> >
> > http://docs.basex.org/wiki/Jobs_Module#jobs:eval
> >
> > Thanks, Daniel
> >


Re: [basex-talk] jobs:eval as a service, "no variables allowed"

2019-04-03 Thread Christian Grün
Hi Daniel,

no variables can be bound if services are registered, that’s true
(values that are bound to variables might potentially be huge, and
blow up the initial startup time of BaseX). I have added a comment to
our documentation.

Best,
Christian


On Wed, Apr 3, 2019 at 11:57 AM Zimmel, Daniel  wrote:
>
> Hi,
>
> when I try to register jobs:eval as a service, BaseX 9.2 says: "no variables 
> allowed".
>
> Is it not possible to register a service with a variable?
>
> Not working:
>
> jobs:eval("declare variable $xml external; $xml",
> map { 'xml': 'XML' },
> map { 'id':'TEST', 'start':'11:31:50', 'interval':'P1D', 'service': true() })
>
> working:
>
> jobs:eval("declare variable $xml external; $xml",
> map { 'xml': 'XML' },
> map { 'id':'TEST', 'start':'11:31:50', 'interval':'P1D', 'service': false() })
>
> http://docs.basex.org/wiki/Jobs_Module#jobs:eval
>
> Thanks, Daniel
>