file pattern when creating DB
Monday, 9 December 2019 · 7 messages
R
radim-havlicek9 Dec 2019 09:42 #
Hello,
I would like to ask about filters.
I'd like to call XQuery
db:create("DB", "c:/Temp/defaultDocuments/", "/")but with filter pattern * becase without that pattern it adds *.xml files only. I would like to add all files from that directory and sub-directories. Is it possible to put the filter pattern there?
I discovered ADD TO / "C:/Temp/defaultDocuments" does exactly what I want, but I would much rather use XQuery like
db:create or
db:add("DB", "Temp/defaultDocuments", "/") but the db:add filters the files with *.xml.
Is it posssible to add all files with any XQuery?
Thank in advance for your reply. Best regards,
Radim HavlicekEF
ETANCHAUD Fabrice9 Dec 2019 10:11 #
Hi Radim,
you can pass parsing options to
db:create [1], and set createfilter to the desired glob pattern.
Best regards,
Fabrice
[1] : http://docs.basex.org/wiki/Database_Module#db:createQuoted text · BaseX-Talk · 14 lines
De : BaseX-Talk <basex-talk-bounces at mailman.uni-konstanz.de> de la part de radim-havlicek at post.cz <radim-havlicek at post.cz> Envoyé : lundi 9 décembre 2019 09:42 À : basex-talk at mailman.uni-konstanz.de <basex-talk at mailman.uni-konstanz.de> Objet : [basex-talk] file pattern when creating DB Hello, I would like to ask about filters. I'd like to call XQuery db:create("DB", "c:/Temp/defaultDocuments/", "/") but with filter pattern * becase without that pattern it adds *.xml files only. I would like to add all files from that directory and sub-directories. Is it possible to put the filter pattern there? I discovered ADD TO / "C:/Temp/defaultDocuments" does exactly what I want, but I would much rather use XQuery like db:create or db:add("DB", "Temp/defaultDocuments", "/") but the db:add filters the files with *.xml. Is it posssible to add all files with any XQuery? Thank in advance for your reply. Best regards, Radim Havlicek
R
radim-havlicek9 Dec 2019 10:19 #
Hi,
I've seen the link before but I was unable to compose the particular query to create the database with filter *, and still I am.
---------- Původní e-mail ----------
Od: ETANCHAUD Fabrice <fabrice.etanchaud at maif.fr>
Komu: radim-havlicek at post.cz <radim-havlicek at post.cz>, basex-talk@mailman. uni-konstanz.de <basex-talk at mailman.uni-konstanz.de>
Datum: 9. 12. 2019 10:14:37
Předmět: RE: [basex-talk] file pattern when creating DB
"
Hi Radim,
you can pass parsing options to
db:create [1], and set createfilter to the desired glob pattern.
Best regards,
Fabrice
[1] : http://docs.basex.org/wiki/Database_Module#db:create
(http://docs.basex.org/wiki/Database_Module#db:create)
----------------------------------------------------------------------------Quoted text · BaseX-Talk · 20 lines
De : BaseX-Talk <basex-talk-bounces at mailman.uni-konstanz.de> de la part de radim-havlicek at post.cz <radim-havlicek at post.cz> Envoyé : lundi 9 décembre 2019 09:42 À : basex-talk at mailman.uni-konstanz.de <basex-talk at mailman.uni-konstanz.de> Objet : [basex-talk] file pattern when creating DB Hello, I would like to ask about filters. I'd like to call XQuery db:create("DB", "c:/Temp/defaultDocuments/", "/") but with filter pattern * becase without that pattern it adds *.xml files only. I would like to add all files from that directory and sub-directories. Is it possible to put the filter pattern there? I discovered ADD TO / "C:/Temp/defaultDocuments" does exactly what I want, but I would much rather use XQuery like db:create or db:add("DB", "Temp/defaultDocuments", "/") but the db:add filters the files with *.xml. Is it posssible to add all files with any XQuery? Thank in advance for your reply. Best regards, Radim Havlicek "
EF
ETANCHAUD Fabrice9 Dec 2019 10:25 #
Radim, here is a simple snippet :
db:create('test-db', 'F:\Utilisateurs\14484H\data\test', (), map { 'createfilter' : '*.*' })Fabrice
Quoted text · radim-havlicek at post.cz · 31 lines
De : radim-havlicek at post.cz <radim-havlicek at post.cz> Envoyé : lundi 9 décembre 2019 10:19 À : ETANCHAUD Fabrice <fabrice.etanchaud at maif.fr> Cc : basex-talk at mailman.uni-konstanz.de <basex-talk at mailman.uni-konstanz.de> Objet : RE: [basex-talk] file pattern when creating DB Hi, I've seen the link before but I was unable to compose the particular query to create the database with filter *, and still I am. ---------- Původní e-mail ---------- Od: ETANCHAUD Fabrice <fabrice.etanchaud at maif.fr> Komu: radim-havlicek at post.cz <radim-havlicek at post.cz>, basex-talk at mailman.uni-konstanz.de <basex-talk at mailman.uni-konstanz.de> Datum: 9. 12. 2019 10:14:37 Předmět: RE: [basex-talk] file pattern when creating DB Hi Radim, you can pass parsing options to db:create [1], and set createfilter to the desired glob pattern. Best regards, Fabrice [1] : http://docs.basex.org/wiki/Database_Module#db:create De : BaseX-Talk <basex-talk-bounces at mailman.uni-konstanz.de> de la part de radim-havlicek at post.cz <radim-havlicek at post.cz> Envoyé : lundi 9 décembre 2019 09:42 À : basex-talk at mailman.uni-konstanz.de <basex-talk at mailman.uni-konstanz.de> Objet : [basex-talk] file pattern when creating DB Hello, I would like to ask about filters. I'd like to call XQuery db:create("DB", "c:/Temp/defaultDocuments/", "/") but with filter pattern * becase without that pattern it adds *.xml files only. I would like to add all files from that directory and sub-directories. Is it possible to put the filter pattern there? I discovered ADD TO / "C:/Temp/defaultDocuments" does exactly what I want, but I would much rather use XQuery like db:create or db:add("DB", "Temp/defaultDocuments", "/") but the db:add filters the files with *.xml. Is it posssible to add all files with any XQuery? Thank in advance for your reply. Best regards, Radim Havlicek
R
radim-havlicek9 Dec 2019 10:49 #
Thank you very much! That was exactly what I was looking for.
Best regards,
Radim Havlicek
---------- Původní e-mail ----------
Od: ETANCHAUD Fabrice <fabrice.etanchaud at maif.fr>
Komu: BaseX <basex-talk at mailman.uni-konstanz.de>
Datum: 9. 12. 2019 10:28:57
Předmět: Re: [basex-talk] file pattern when creating DB
"
Radim, here is a simple snippet :
db:create('test-db', 'F:\Utilisateurs\14484H\data\test', (), map { 'createfilter' : '*.*' })
Fabrice
----------------------------------------------------------------------------Quoted text · radim-havlicek at post.cz · 44 lines
De : radim-havlicek at post.cz <radim-havlicek at post.cz> Envoyé : lundi 9 décembre 2019 10:19 À : ETANCHAUD Fabrice <fabrice.etanchaud at maif.fr> Cc : basex-talk at mailman.uni-konstanz.de <basex-talk at mailman.uni-konstanz.de> Objet : RE: [basex-talk] file pattern when creating DB Hi, I've seen the link before but I was unable to compose the particular query to create the database with filter *, and still I am. ---------- Původní e-mail ---------- Od: ETANCHAUD Fabrice <fabrice.etanchaud at maif.fr> Komu: radim-havlicek at post.cz <radim-havlicek at post.cz>, basex-talk@mailman. uni-konstanz.de <basex-talk at mailman.uni-konstanz.de> Datum: 9. 12. 2019 10:14:37 Předmět: RE: [basex-talk] file pattern when creating DB " Hi Radim, you can pass parsing options to db:create [1], and set createfilter to the desired glob pattern. Best regards, Fabrice [1] : http://docs.basex.org/wiki/Database_Module#db:create (http://docs.basex.org/wiki/Database_Module#db:create) ---------------------------------------------------------------------------- De : BaseX-Talk <basex-talk-bounces at mailman.uni-konstanz.de> de la part de radim-havlicek at post.cz <radim-havlicek at post.cz> Envoyé : lundi 9 décembre 2019 09:42 À : basex-talk at mailman.uni-konstanz.de <basex-talk at mailman.uni-konstanz.de> Objet : [basex-talk] file pattern when creating DB Hello, I would like to ask about filters. I'd like to call XQuery db:create("DB", "c:/Temp/defaultDocuments/", "/") but with filter pattern * becase without that pattern it adds *.xml files only. I would like to add all files from that directory and sub-directories. Is it possible to put the filter pattern there? I discovered ADD TO / "C:/Temp/defaultDocuments" does exactly what I want, but I would much rather use XQuery like db:create or db:add("DB", "Temp/defaultDocuments", "/") but the db:add filters the files with *.xml. Is it posssible to add all files with any XQuery? Thank in advance for your reply. Best regards, Radim Havlicek " "
EF
ETANCHAUD Fabrice9 Dec 2019 10:58 #
Great !
XQuery 3.1 is such a powerful language,
Thanks to Christian and his team's members !
I have been using BaseX for ten years,
and never saw such helping team and community as BaseX's ones !
Christian, did you think about bringing BaseX to Slack ?
Best regards,
fabrice
Quoted text · radim-havlicek at post.cz · 47 lines
De : radim-havlicek at post.cz <radim-havlicek at post.cz> Envoyé : lundi 9 décembre 2019 10:49 À : ETANCHAUD Fabrice <fabrice.etanchaud at maif.fr> Cc : BaseX <basex-talk at mailman.uni-konstanz.de> Objet : Re: [basex-talk] file pattern when creating DB Thank you very much! That was exactly what I was looking for. Best regards, Radim Havlicek ---------- Původní e-mail ---------- Od: ETANCHAUD Fabrice <fabrice.etanchaud at maif.fr> Komu: BaseX <basex-talk at mailman.uni-konstanz.de> Datum: 9. 12. 2019 10:28:57 Předmět: Re: [basex-talk] file pattern when creating DB Radim, here is a simple snippet : db:create('test-db', 'F:\Utilisateurs\14484H\data\test', (), map { 'createfilter' : '*.*' }) Fabrice De : radim-havlicek at post.cz <radim-havlicek at post.cz> Envoyé : lundi 9 décembre 2019 10:19 À : ETANCHAUD Fabrice <fabrice.etanchaud at maif.fr> Cc : basex-talk at mailman.uni-konstanz.de <basex-talk at mailman.uni-konstanz.de> Objet : RE: [basex-talk] file pattern when creating DB Hi, I've seen the link before but I was unable to compose the particular query to create the database with filter *, and still I am. ---------- Původní e-mail ---------- Od: ETANCHAUD Fabrice <fabrice.etanchaud at maif.fr> Komu: radim-havlicek at post.cz <radim-havlicek at post.cz>, basex-talk at mailman.uni-konstanz.de <basex-talk at mailman.uni-konstanz.de> Datum: 9. 12. 2019 10:14:37 Předmět: RE: [basex-talk] file pattern when creating DB Hi Radim, you can pass parsing options to db:create [1], and set createfilter to the desired glob pattern. Best regards, Fabrice [1] : http://docs.basex.org/wiki/Database_Module#db:create De : BaseX-Talk <basex-talk-bounces at mailman.uni-konstanz.de> de la part de radim-havlicek at post.cz <radim-havlicek at post.cz> Envoyé : lundi 9 décembre 2019 09:42 À : basex-talk at mailman.uni-konstanz.de <basex-talk at mailman.uni-konstanz.de> Objet : [basex-talk] file pattern when creating DB Hello, I would like to ask about filters. I'd like to call XQuery db:create("DB", "c:/Temp/defaultDocuments/", "/") but with filter pattern * becase without that pattern it adds *.xml files only. I would like to add all files from that directory and sub-directories. Is it possible to put the filter pattern there? I discovered ADD TO / "C:/Temp/defaultDocuments" does exactly what I want, but I would much rather use XQuery like db:create or db:add("DB", "Temp/defaultDocuments", "/") but the db:add filters the files with *.xml. Is it posssible to add all files with any XQuery? Thank in advance for your reply. Best regards, Radim Havlicek
CG
Christian Grün9 Dec 2019 17:06 #
Hi Fabrice,
A chat for BaseX sounds like a good idea; I think the great guys from eXist-db did something similar? Would some more of you be interested in having such a chat?
We’ll internally discuss this in the near future.
Cheers,
Christian
PS: Thanks for the kudos.
Quoted text · ETANCHAUD Fabrice · 86 lines
On Mon, Dec 9, 2019 at 10:58 AM ETANCHAUD Fabrice <fabrice.etanchaud at maif.fr> wrote: > > Great ! > XQuery 3.1 is such a powerful language, > Thanks to Christian and his team's members ! > I have been using BaseX for ten years, > and never saw such helping team and community as BaseX's ones ! > > Christian, did you think about bringing BaseX to Slack ? > > Best regards, > fabrice > > > ________________________________ > De : radim-havlicek at post.cz <radim-havlicek at post.cz> > Envoyé : lundi 9 décembre 2019 10:49 > À : ETANCHAUD Fabrice <fabrice.etanchaud at maif.fr> > Cc : BaseX <basex-talk at mailman.uni-konstanz.de> > Objet : Re: [basex-talk] file pattern when creating DB > > Thank you very much! That was exactly what I was looking for. > Best regards, > > Radim Havlicek > > ---------- Původní e-mail ---------- > Od: ETANCHAUD Fabrice <fabrice.etanchaud at maif.fr> > Komu: BaseX <basex-talk at mailman.uni-konstanz.de> > Datum: 9. 12. 2019 10:28:57 > Předmět: Re: [basex-talk] file pattern when creating DB > > Radim, here is a simple snippet : > > db:create('test-db', 'F:\Utilisateurs\14484H\data\test', (), map { 'createfilter' : '*.*' }) > > Fabrice > > ________________________________ > De : radim-havlicek at post.cz <radim-havlicek at post.cz> > Envoyé : lundi 9 décembre 2019 10:19 > À : ETANCHAUD Fabrice <fabrice.etanchaud at maif.fr> > Cc : basex-talk at mailman.uni-konstanz.de <basex-talk at mailman.uni-konstanz.de> > Objet : RE: [basex-talk] file pattern when creating DB > > Hi, > I've seen the link before but I was unable to compose the particular query to create the database with filter *, and still I am. > > ---------- Původní e-mail ---------- > Od: ETANCHAUD Fabrice <fabrice.etanchaud at maif.fr> > Komu: radim-havlicek at post.cz <radim-havlicek at post.cz>, basex-talk at mailman.uni-konstanz.de <basex-talk at mailman.uni-konstanz.de> > Datum: 9. 12. 2019 10:14:37 > Předmět: RE: [basex-talk] file pattern when creating DB > > Hi Radim, > > you can pass parsing options to db:create [1], and set createfilter to the desired glob pattern. > > Best regards, > Fabrice > > > [1] : http://docs.basex.org/wiki/Database_Module#db:create > > > ________________________________ > De : BaseX-Talk <basex-talk-bounces at mailman.uni-konstanz.de> de la part de radim-havlicek at post.cz <radim-havlicek at post.cz> > Envoyé : lundi 9 décembre 2019 09:42 > À : basex-talk at mailman.uni-konstanz.de <basex-talk at mailman.uni-konstanz.de> > Objet : [basex-talk] file pattern when creating DB > > Hello, > I would like to ask about filters. > > I'd like to call XQuery > db:create("DB", "c:/Temp/defaultDocuments/", "/") > but with filter pattern * becase without that pattern it adds *.xml files only. I would like to add all files from that directory and sub-directories. Is it possible to put the filter pattern there? > > I discovered ADD TO / "C:/Temp/defaultDocuments" does exactly what I want, but I would much rather use XQuery like db:create or > db:add("DB", "Temp/defaultDocuments", "/") but the db:add filters the files with *.xml. > > Is it posssible to add all files with any XQuery? > Thank in advance for your reply. Best regards, > > Radim Havlicek
Written for BaseX 9.3. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery