Way to Dynamically import a module?
Sunday, 13 March 2022 · 4 messages · last reply 14 Mar 2022
BK
Buddy Kresge13 Mar 2022 20:47 #
I was wondering if in BaseX there is a way at run time to import a .xqm module, outside of the traditional "import module" statement.
Thanks in advance for any guidance you can provide.
Buddy
CG
Christian Grün13 Mar 2022 21:50 #
Hi Buddy,
Quoted text · Buddy Kresge · 1 line
> I was wondering if in BaseX there is a way at run time to import a .xqm module, outside of the traditional “import module” statement.
Check out
inspect:functions [1].
Hope this helps,
Christian
[1] https://docs.basex.org/wiki/Inspection_Module#inspect:functionsBK
Buddy Kresge14 Mar 2022 14:40 #
Thank you! Follow up (strange) question. Is there the ability to "unload" a module dynamically?
Buddy
Quoted text · Christian Grün · 12 lines
-----Original Message----- From: Christian Grün <christian.gruen at gmail.com> Sent: Sunday, March 13, 2022 4:50 PM To: Buddy Kresge <buddy.kresge at known2u.com> Cc: BaseX <basex-talk at mailman.uni-konstanz.de> Subject: Re: [basex-talk] Way to Dynamically import a module? Hi Buddy, > I was wondering if in BaseX there is a way at run time to import a .xqm module, outside of the traditional “import module” statement. Check out inspect:functions [1]. Hope this helps, Christian [1] https://docs.basex.org/wiki/Inspection_Module#inspect:functions
CG
Christian Grün14 Mar 2022 14:43 #
Quoted text · Buddy Kresge · 1 line
> Thank you! Follow up (strange) question. Is there the ability to "unload" a module dynamically?
Imported modules will stay in the context until the query
execution is completed.
Quoted text · Buddy Kresge · 17 lines
> -----Original Message----- > From: Christian Grün <christian.gruen at gmail.com> > Sent: Sunday, March 13, 2022 4:50 PM > To: Buddy Kresge <buddy.kresge at known2u.com> > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > Subject: Re: [basex-talk] Way to Dynamically import a module? > > Hi Buddy, > > > I was wondering if in BaseX there is a way at run time to import a .xqm module, outside of the traditional “import module” statement. > > Check out inspect:functions [1]. > > Hope this helps, > Christian > > [1] https://docs.basex.org/wiki/Inspection_Module#inspect:functions
Written for BaseX 9.6. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery