Skip to content
This repository has been archived by the owner on Dec 7, 2022. It is now read-only.

feat: add isOutputStage and namespaces for operators COMPASS-5876 #127

Closed
wants to merge 1 commit into from

Conversation

mcasimir
Copy link
Contributor

@mcasimir mcasimir commented Jun 6, 2022

  • introduce isOutputStage to identify stages that would write to an external collection or bucket
  • Replace isDbOnly with a namespace enum since there are also stages that are specific to collection types
  • few pass-by fixes to documentation / properties
  • add test to enforce the shape of operator metadata

meta: 'stage',
version: '4.4.9',
apiVersions: [1],
description: 'Returns literal results for a full-text search.',
namespaces: [ DATABASE ],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you change the code in compass that uses dbOnly?

Copy link
Contributor Author

@mcasimir mcasimir Jun 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need this to be released first. I learned that we have also stages that would only work with certain types of collections, including stages that are "collection only" like $collStats, so probably this client code is easier:

const namespaceType = isTimeseries : TIME_SERIES ? Boolean(sourceName) ? VIEW : COLLECTION;

const stageOperators = filter((op) => op.namespaces.include(namespaceType)) ...

@mcasimir mcasimir closed this Jun 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants