
admin:database-get-range-policy-partition-key( $range-policy as element(db:assignment-policy) ) as cts:reference
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.
|
http://marklogic.com/xdmp/privileges/admin/database
http://marklogic.com/xdmp/privileges/admin/database/{id}
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: Get the most useful answers to questions from the MarkLogic community, or ask your own question.