Search…
Views

Import

1
const Views = org.objects.views;
2
// import Views from 'views';
3
// const Views = CortexObject.as('views');
Copied!

Methods

run(name, options) passthru(name, options)

run(name, options)

Run a stored View.
Arguments
  • name (String) the view name
  • options
    • where
    • map
    • group
    • sort
    • paths
    • limit
    • skip
    • pipeline
Returns
Object[]

passthru(name, options)

Runs a stored View and returns a cursor (without fetching any results) which can be returned from a route script and streamed directly through the api. See QueryCursor.passthru()
Arguments
  • name (String) the view name
  • options
    • where
    • map
    • group
    • sort
    • paths
    • limit
    • skip
    • pipeline
Returns
Cursor
Last modified 2mo ago