Hello,
given the query file [1] called by
http://localhost:8984/rest?run=argon/create-database.xq&DB=test-db&C...
I get the error:
Stopped at ., 3/18: [XPDY0002] No value assigned to $CHOP.
When I change the value, e.g. to nono I get
Invalid 'CHOP' value 'nono'; must be 'yes', 'no', or a boolean.
Running on basex 9.1
[1] create-database.xq
(:~ New database name. :) declare variable $DB as xs:string external; declare variable $CHOP as xs:string external; declare variable $FTINDEX as xs:string external; declare variable $TEXTINDEX as xs:string external; declare variable $ATTRINDEX as xs:string external; declare variable $TOKENINDEX as xs:string external;
let $exists := db:exists($DB) let $meta := concat('~meta_', $DB) let $history := concat('~history_', $DB)
return if(not($exists)) then ( db:create($meta), db:create($history), db:create($DB, (), (), map { 'chop' : $CHOP , 'ftindex' : $FTINDEX , 'textindex' : $TEXTINDEX , 'attrindex' : $ATTRINDEX , 'tokenindex' : $TOKENINDEX }) ) else ()