Loading TOC...

MarkLogic 9 Product Documentation
admin.databaseGetRangePolicyPartitionKey

admin.databaseGetRangePolicyPartitionKey(
   range-policy as element(db.assignmentPolicy)
) 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

const admin = require('/MarkLogic/admin.xqy');
var config = admin.getConfiguration()
var dbid = admin.databaseGetId(config, "myDatabase")
var policy = admin.databaseGetAssignmentPolicy(config, dbid)
admin.databaseGetRangePolicyPartitionKey(policy)

    

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