MarkLogic SQL簡単使用

(: 技能者情報一覧取得 :)
cts:uri-match("*GINOUSYA_INFO*.json")

xquery version "1.0-ml";
xdmp:directory("/ccus/doc/GINOUSYA_INFO/")/ROOT[GINOUSYA_ID="15174859200921"]

xdmp:node-replace(collection("M_USER_INFO")/ROOT[LOGIN_ID = "" and USER_TYPE = ""]/JIGYOUSYA_ID,text{"想更新的值"})
(: 事業者情報一覧取得 :)
(: cts:uri-match("*JIGYOUSYA_INFO*.json") :)

fn:doc("/ccus/doc/GINOUSYA_INFO/A000000000A002.json")

xdmp:document-set-collections( "/ccus/mst/M_NINTEI_SYSTEM_ACCOUNT.json", "M_NINTEI_SYSTEM_ACCOUNT")

xquery version "1.0-ml";
declare namespace html = "http://www.w3.org/1999/xhtml";
(:xdmp:document-delete("/ccus/doc/GINOUSYA_INFO/GINOUSYAA000A005.json"):)
xdmp:document-delete("/ccus/doc/SITE_CONTRACT_INFO/SiteB0000001.json")

xquery version "1.0-ml";
declare namespace html = "http://www.w3.org/1999/xhtml";
xdmp:directory("/ccus/doc/JIGYOUSYA_INFO/")/ROOT(:[JIGYOUSYA_ID="9702927833239712871"]/DATA_TYPE:)

xquery version "1.0-ml";
for $x in doc("/ccus/mst/M_NINTEI_SYSTEM_ACCOUNT.json")
return $x

xquery version "1.0-ml";
declare namespace html = "http://www.w3.org/1999/xhtml";
declare variable $json_UserInfo :='
{
    "ROOT": {
        
    }
}';
xdmp:document-insert("/ccus/mst/M_NINTEI_SYSTEM_ACCOUNT.json",xdmp:unquote($json_UserInfo));

xdmp:document-add-collections("/ccus/doc/M_USER_INFO/70010000000005.json", "M_USER_INFO");
xdmp:document-set-permissions("/ccus/mst/M_NINTEI_SYSTEM_ACCOUNT.json", (xdmp:permission("rest-reader", "read"), xdmp:permission("rest-writer", "update")));

你可能感兴趣的:(MarkLogic)