Loading TOC...

MarkLogic 12 EA 1 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.databaseGetAssignmentPolicy 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');
const config = admin.getConfiguration()
const dbid = admin.databaseGetId(config, "myDatabase")
const 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.