Loading TOC...

MarkLogic Server 11.0 Product Documentation
view.setName

view.setName(
   schema-name as String,
   view-name as String,
   new-name as String
) as null

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

const view = require('/MarkLogic/views');

view.setName('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.