Loading TOC...

xdmp.amp

xdmp.amp(
   $namespace as String,
   $localname as String,
   $module-uri as String,
   $database as String
) as String

Summary

Returns the amp ID for the specified amp. Unlike the security library module function sec:uid-for-name, this function can be evaluated against any database and does not need to be evaluated directly against the security database. It returns the amp ID from the security database configured for the database in which the App Server evaluates against.

Parameters
$namespace A function namespace.
$localname A function localname.
$module-uri The module URI for the amp.
$database The ID of the database in which the module to which this amp refers is stored. If the module is on the filesystem under the Modules directory, then specify 0 for the database ID.

Example

xdmp.amp("http://marklogic.com/xdmp/security", "amp-add-roles",
         "/MarkLogic/security.xqy", 0);
=> 3548369234520018804

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy