MarkLogic 10 Product Documentation
view:add-column

view:add-column(
   $schema-name as xs:string,
   $view-name as xs:string,
   $column as element(view:column)
) as empty-sequence()

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

  xquery version "1.0-ml"; 
 
  import module namespace view = "http://marklogic.com/xdmp/view" 
      at "/MarkLogic/views.xqy";
 
  view:add-column("main", "songs",
      (view:column("author", cts:element-reference(xs:QName("AUTHOR")))) )

  (: Adds an 'author' column to the 'songs' view in the 'main' schema. :)
     
Powered by MarkLogic Server | Terms of Use | Privacy Policy