let $options := map:merge((
map:entry("CHOP", false()),
map:entry('INDENT', false()),
map:entry('STRIPNS', false()),
map:entry('INTPARSE', true()),
map:entry('DTD', false()),
map:entry('XINCLUDE', false()),
map:entry('UPDINDEX', true()),
map:entry('AUTOOPTIMIZE', true())
))
return (
db:create($db-name, $src-folder, (), $options),
db:output(<div>done</div>)
)
Bonjour France,
Didn’t you find Updindex and autooptimize options in the ‘Options’ panel of the db creation window ?
Db:create last parameter is the place to put all your options :
http://docs.basex.org/wiki/Dat
abase_Module#db:create
But the Pending update list may overflow memory during db creation/update.
You should definitively have a look at the BaseX Scripts (BXS).
You can declare a batch of commands in XML, and ask BaseX to run it :
http://docs.basex.org/wiki/Com
mands#Command_Scripts
This is the way to set options before invoking the CREATE-DB command :
http://docs.basex.org/wiki/Com
mands#SET
I usually write XQuery to generate a BXS that will do the job.
Cordialement,
Fabrice
CERFrance Poitou-Charentes
De : basex-talk-bounces@mailman.uni
-konstanz.de [mailto:basex-talk-bounces@mailman.uni-konstanz.de ] De la part de France Baril
Envoyé : vendredi 20 octobre 2017 10:44
À : BaseX
Objet : [basex-talk] Options for creating database...
Hi, I usually create dbs using the gui. I'm now trying to create asb without it to be able to set the updindex and autooptimize options, which I can't find in the GUI.
I couldn't figure how to set them out using db:create either, so I switch to command line. Now I'm feeling dumb, I can't find how to set up parsing/indexing options for the command line. I'm looking at: http://docs.basex.org/wiki
/Command-Line_Options . I found -sindent and -wchop only.
What am I missing?
Here are all the options that I'd want to set:
let $options := map:merge((
map:entry("CHOP", false()),
map:entry('INDENT', false()),
map:entry('STRIPNS', false()),
map:entry('INTPARSE', true()),
map:entry('DTD', false()),
map:entry('XINCLUDE', false()),
map:entry('UPDINDEX', true()),
map:entry('AUTOOPTIMIZE', true())
))
I don't want to set UPDINDEX and AUTOOPTIMIZE in .basex because I only want them to be true() on one of my DBs. Other DBs should remain as is.
--
France Baril
Architecte documentaire / Documentation architect
france.baril@architextus.com