Changes

Jump to navigation Jump to search
734 bytes added ,  19:48, 13 June 2013
|-
| width='90' | '''Signatures'''
|{{Func|db:create|$db as xs:string|empty-sequence()}}<br/>{{Func|db:create|$db as xs:string, $inputs as item()*|empty-sequence()}}<br/>{{Func|db:create|$db as xs:string, $inputs as item()*, $paths as xs:string*|empty-sequence()}}<br/>{{Func|db:create|$db as xs:string, $inputs as item()*, $paths as xs:string*, $options as item()|empty-sequence()}}
|-
| '''Summary'''
|Creates a new database with name {{Code|$db}} and adds initial documents specified via {{Code|$inputs}} to the specified {{Code|$paths}}.<br/>{{Code|$inputs}} may be strings or nodes different than attributes. If the {{Code|$input}} source is not a file or a folder, the {{Code|$paths}} argument is mandatory.<br/>Please note that {{Code|db:create}} will be placed last on the [[XQuery Update#Pending Update List|Pending Update List]]. As a consequence, a newly created database cannot be addressed in the same query.<br/>The {{Code|$options}} argument can be used to change the indexing behavior. Allowed options are [[Options#TEXTINDEX|TEXTINDEX]], [[Options#ATTRINDEX|ATTRINDEX]], [[Options#FTINDEX|FTINDEX]], [[Options#UPDINDEX|UPDINDEX]], [[Options#MAXCATS|MAXCATS]], and [[Options#MAXLEN|MAXLEN]]. Options can either be specified<br />* as children of an {{Code|<options/>}} element, e.g.:<pre class="brush:xml"><options> <textindex value='true'/> <maxcats value='128'/></options></pre>* or as map, which contains all key/value pairs:<pre class="brush:xquery">map { "textindex" := true(), "maxcats" = 128 }</pre>
|-
| '''Errors'''
Bureaucrats, editor, reviewer, Administrators
13,554

edits

Navigation menu