Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Commit

Permalink
Partial fix for #161, use admin function to create index def instead …
Browse files Browse the repository at this point in the history
…of copying xml from ml-config
  • Loading branch information
grtjn committed May 13, 2014
1 parent d264a4c commit 7b0bd7b
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions deploy/lib/xquery/setup.xqy
Original file line number Diff line number Diff line change
Expand Up @@ -1423,7 +1423,16 @@ declare function setup:add-range-element-indexes-R(
{
if ($index-configs) then
setup:add-range-element-indexes-R(
admin:database-add-range-element-index($admin-config, $database, $index-configs[1]),
admin:database-add-range-element-index($admin-config, $database,
admin:database-range-element-index(
$index-configs[1]/db:scalar-type,
$index-configs[1]/db:namespace-uri,
$index-configs[1]/db:localname,
$index-configs[1]/db:collation,
($index-configs[1]/db:range-value-positions/xs:boolean(.), false())[1],
($index-configs[1]/db:invalid-values, "reject")[1]
)
),
$database,
fn:subsequence($index-configs, 2))
else
Expand Down Expand Up @@ -1473,7 +1482,18 @@ declare function setup:add-range-element-attribute-indexes-R(
{
if ($index-configs) then
setup:add-range-element-attribute-indexes-R(
admin:database-add-range-element-attribute-index($admin-config, $database, $index-configs[1]),
admin:database-add-range-element-attribute-index($admin-config, $database,
admin:database-range-element-attribute-index(
$index-configs[1]/db:scalar-type,
$index-configs[1]/db:parent-namespace-uri,
$index-configs[1]/db:parent-localname,
$index-configs[1]/db:namespace-uri,
$index-configs[1]/db:localname,
$index-configs[1]/db:collation,
($index-configs[1]/db:range-value-positions/xs:boolean(.), false())[1],
($index-configs[1]/db:invalid-values, "reject")[1]
)
),
$database,
fn:subsequence($index-configs, 2))
else
Expand Down

0 comments on commit 7b0bd7b

Please sign in to comment.