Loading TOC...

op.viewCol

op.viewCol(
   viewName as String,
   colName as String
) as columnIdentifier

Summary

Identifies a column where the combination of view and column name is unique. Identifying the schema isn't necessary (and it might not exist).

If the combination of view and column name is not unique, an ambiguous column error is thrown.

Parameters
viewName The name of the view.
colName The name of the column.

Example

const op = require('/MarkLogic/optic');

op.fromView('main', 'employees')
	      .orderBy(op.viewCol('employees', 'EmployeeID'))
	      .result();
  

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