admin.databaseValidatePathFields( config as element(configuration), database-id as (Number|String), fields as element(db.field)[] ) as null
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. |
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)
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.