MarkLogic Server 11.0 Product Documentation
view.addColumn

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

Summary

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

Parameters
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.

Example

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.
   
Powered by MarkLogic Server | Terms of Use | Privacy Policy