MarkLogic 10 Product Documentation
admin.databaseValidatePathFields

admin.databaseValidatePathFields(
   config as element(configuration),
   database-id as (Number|String),
   fields as element(db.field)[]
) as null

Summary

For a given sequence of fields, this function validates all the paths on each field using admin:database-validate-field-paths call.

Parameters
config A configuration specification, typically as returned from one of the Admin module functions.
database-id The ID of the database (for example, xdmp.database("myDatabase")).
fields A sequence of fields that will be validated for paths.

Example

const admin = require('/MarkLogic/admin.xqy');

declare namespace db="http://marklogic.com/xdmp/database";
const fieldPath = admin.databaseFieldPath("/a/b/@c", 3.0)
const config = admin.getConfiguration()
const dbid = xdmp.database("Documents")
const fieldName = "myField"
const field = admin.databasePathField(fieldName,fieldPath)
admin.databaseValidatePathFields(
  config,
  dbid,
  field)
    
Powered by MarkLogic Server | Terms of Use | Privacy Policy