view.addColumn( 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.
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.