Loading TOC...

MarkLogic Server 11.0 Product Documentation
view:set-name

view:set-name(
   $schema-name as xs:string,
   $view-name as xs:string,
   $new-name as xs:string
) as empty-sequence()

Summary

This function renames the named view in the named schema specification.

Parameters
schema-name The name of the schema specification containing the view.
view-name The current name of the view to be renamed.
new-name The new name of the view. The view name must be unique in the context of the schema in which it resides. A valid view name is a single word that starts with an alpha character. The view name may contain numeric characters, but cannot contain punctuation or special characters.

Example

  xquery version "1.0-ml"; 
 
  import module namespace view = "http://marklogic.com/xdmp/view" 
      at "/MarkLogic/views.xqy";
 
  view:set-name("main", "songs", "tunes")

  (: Renames the 'songs' view in the 'main' schema to 'tunes'. :)
     

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