Radim, here is a simple snippet :
db:create('test-db', 'F:\Utilisateurs\14484H\data\test', (), map { 'createfilter' : '*.*' })
Fabrice
________________________________ De : radim-havlicek@post.cz radim-havlicek@post.cz Envoyé : lundi 9 décembre 2019 10:19 À : ETANCHAUD Fabrice fabrice.etanchaud@maif.fr Cc : basex-talk@mailman.uni-konstanz.de basex-talk@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@maif.fr Komu: radim-havlicek@post.cz radim-havlicek@post.cz, basex-talk@mailman.uni-konstanz.de basex-talk@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@mailman.uni-konstanz.de de la part de radim-havlicek@post.cz radim-havlicek@post.cz Envoyé : lundi 9 décembre 2019 09:42 À : basex-talk@mailman.uni-konstanz.de basex-talk@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