Loading TOC...


   schema-name as String,
   view-name as String,
   column as element(view.column)
) as null


This function adds column specifications to the current set of column specifications on the named view in the named schema.

schema-name The name of the schema specification containing the view.
view-name The name of the view to which the column specifications are to be added.
column The column specifications to be added to the view.


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

view.addColumn('main', 'songs',
      (view.column('author', cts.elementReference(xs.QName('AUTHOR')))) );

// Adds an 'author' column to the 'songs' view in the 'main' schema.

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