Skip to content

Commit bbf46f8

Browse files
committed
fix #242, make update transaction mode explicit as is now required for REST extensions that make updates
1 parent e1582de commit bbf46f8

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

src/main/resources/scripts/docbatch.xqy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ declare namespace rapi = "http://marklogic.com/rest-api";
1919
declare default function namespace "http://www.w3.org/2005/xpath-functions";
2020
declare option xdmp:mapping "false";
2121

22-
declare function docbatch:post(
22+
declare %rapi:transaction-mode("update")
23+
function docbatch:post(
2324
$context as map:map,
2425
$params as map:map,
2526
$input as document-node()*

src/main/resources/scripts/docsplit.xqy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ declare namespace rapi = "http://marklogic.com/rest-api";
1616
declare default function namespace "http://www.w3.org/2005/xpath-functions";
1717
declare option xdmp:mapping "false";
1818

19-
declare function docsplit:post(
19+
declare %rapi:transaction-mode("update")
20+
function docsplit:post(
2021
$context as map:map,
2122
$params as map:map,
2223
$input as document-node()*

src/main/resources/scripts/graph-service.xqy

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import module namespace semmod = "http://marklogic.com/rest-api/models/semantics
1313

1414
declare namespace search = "http://marklogic.com/appservices/search";
1515

16+
declare namespace rapi = "http://marklogic.com/rest-api";
17+
1618
declare default function namespace "http://www.w3.org/2005/xpath-functions";
1719
declare option xdmp:mapping "false";
1820

@@ -62,7 +64,8 @@ declare function graph:get(
6264
)
6365
};
6466

65-
declare function graph:post(
67+
declare %rapi:transaction-mode("update")
68+
function graph:post(
6669
$context as map:map,
6770
$params as map:map,
6871
$input as document-node()*

0 commit comments

Comments
 (0)