MarkLogic 12 EA 1 Product Documentation
sec.removeAmp

sec.removeAmp(
   namespace as String,
   local-name as String,
   document-uri as String,
   database as xs.anyAtomicType
) as null

Summary

Removes the amp ($namespace, $local-name, $document-uri, $database) and returns empty-sequence().

Parameters
namespace The namespace of the function to which the amp applies.
local-name The name of the function to which the amp applies.
document-uri The URI of the module in which the function is located.
database The Database ID or name in which the module is located. If the module is on the filesystem (in the Modules directory), specify xs:unsignedLong(0).

Required Privileges

http://marklogic.com/xdmp/privileges/remove-amp

Usage Notes

If an amp ($namespace, $local-name, $document-uri) is not found, an error is returned.

This function must be executed against the security database.

Example


// execute this against the security database

declareUpdate();   
const sec = require('/MarkLogic/security.xqy');

sec.removeAmp(
    "http://marklogic.com/my_modules/myspace",
    "my-amp",
    "/MarkLogic/MyModule.xqy",
    0)
   
// Removes the "my-amp" amp.  
Powered by MarkLogic Server | Terms of Use | Privacy Policy