Loading TOC...

MarkLogic 9 Product Documentation
pkg:put-database

pkg:put-database(
   $pkgname as xs:string,
   $dbxml as element(db:package-database)
) as empty-sequence()

Summary

[DEPRECATED: use cma:generate-config and cma:apply-config instead.]

Adds a database configuration to the named package.

Parameters
pkgname The name of the package to which to add the database configuration.
dbxml The database configuration (in XML), such as that returned from the pkg:database-configuration function.

Example


xquery version "1.0-ml"; 
 
import module namespace pkg = "http://marklogic.com/manage/package" 
      at "/MarkLogic/manage/package/package.xqy";

pkg:put-database("mypackage", pkg:database-configuration("Documents"))

(: Add the configuration of the 'Documents' database to the package
   named, 'mypackage'. :)
    

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.