Skip to content

Commit

Permalink
marklogic-community#492 removed no-longer-needed eval; dropped suppor…
Browse files Browse the repository at this point in the history
…t for ML4
  • Loading branch information
dmcassel committed Jan 17, 2017
1 parent 233dddc commit 5ac5a7c
Showing 1 changed file with 11 additions and 22 deletions.
33 changes: 11 additions & 22 deletions deploy/lib/xquery/setup.xqy
Original file line number Diff line number Diff line change
Expand Up @@ -1829,30 +1829,19 @@ declare function setup:add-field-excludes-R(
$admin-config,
$database,
$field-configs[1]/db:field-name,
for $e in $field-configs[1]/db:excluded-elements/db:excluded-element
for $excluded in $field-configs[1]/db:excluded-elements/db:excluded-element
return
if (fn:starts-with(xdmp:version(), "4")) then
admin:database-excluded-element(
$e/db:namespace-uri,
$e/db:localname/fn:string(.))
else
xdmp:eval(
'import module namespace admin = "http://marklogic.com/xdmp/admin" at "/MarkLogic/admin.xqy";
declare namespace db="http://marklogic.com/xdmp/database";
declare variable $e external;
admin:database-excluded-element(
$e/db:namespace-uri,
$e/db:localname/fn:string(.),
($e/db:attribute-namespace-uri, "")[1],
($e/db:attribute-localname/fn:string(.), "")[1],
($e/db:attribute-value, "")[1])',
(xs:QName("e"), $e),
<options xmlns="xdmp:eval">
<isolation>same-statement</isolation>
</options>)),
admin:database-excluded-element(
$excluded/db:namespace-uri,
$excluded/db:localname/fn:string(.),
($excluded/db:attribute-namespace-uri, "")[1],
($excluded/db:attribute-localname/fn:string(.), "")[1],
($excluded/db:attribute-value, "")[1]
)
),
$database,
fn:subsequence($field-configs, 2))
fn:subsequence($field-configs, 2)
)
else
$admin-config
};
Expand Down

0 comments on commit 5ac5a7c

Please sign in to comment.