Loading TOC...

MarkLogic Server 11.0 Product Documentation
admin:database-get-range-policy-partition-key

admin:database-get-range-policy-partition-key(
   $range-policy as element(db:assignment-policy)
) as cts:reference

Summary

This function returns the range policy partition key set for the database.

Parameters
range-policy The range assignment policy returned from the admin:database-get-assignment-policy function.

Required Privileges

This operation requires at least one of the following privileges:

http://marklogic.com/xdmp/privileges/admin/database

http://marklogic.com/xdmp/privileges/admin/database/{id}

Example



xquery version "1.0-ml";

import module namespace admin = "http://marklogic.com/xdmp/admin"
      at "/MarkLogic/admin.xqy";

let $config := admin:get-configuration()
let $dbid := admin:database-get-id($config, "myDatabase")
let $policy := admin:database-get-assignment-policy($config, $dbid)
return admin:database-get-range-policy-partition-key($policy)

    

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.