MongoDB C++ Driver 4.2.0
Loading...
Searching...
No Matches
mongocxx::v1::pipeline Class Reference

#include <mongocxx/v1/pipeline.hpp>

Description

A MongoDB aggregation pipeline.

See also
Attention
This feature is experimental! It is not ready for use!

Public Member Functions

 pipeline ()
 Default initialization.
 pipeline (pipeline &&other) noexcept
 Move constructor.
 pipeline (pipeline const &other)
 Copy constructor.
 ~pipeline ()
 Destroy this object.
pipelineadd_fields (bsoncxx::v1::document::view v)
 Append the "$addFields" stage.
pipelineappend_stage (bsoncxx::v1::document::view v)
 Append the given aggregation stage.
pipelineappend_stages (bsoncxx::v1::array::view v)
 Append an array of aggregation stages.
pipelinebucket (bsoncxx::v1::document::view v)
 Append the "$bucket" stage.
pipelinebucket_auto (bsoncxx::v1::document::view v)
 Append the "$bucketAuto" stage.
pipelinecoll_stats ()
 Append the "$collStats" stage with an empty document.
pipelinecoll_stats (bsoncxx::v1::document::view v)
 Append the "$collStats" stage.
pipelinecount (bsoncxx::v1::stdx::string_view v)
 Append the "$count" stage.
pipelinecurrent_op (bsoncxx::v1::document::view v)
 Append the "$currentOp" stage.
pipelinefacet (bsoncxx::v1::document::view v)
 Append the "$facet" stage.
pipelinegeo_near (bsoncxx::v1::document::view v)
 Append the "$geoNear" stage.
pipelinegraph_lookup (bsoncxx::v1::document::view v)
 Append the "$graphLookup" stage.
pipelinegroup (bsoncxx::v1::document::view v)
 Append the "$group" stage.
pipelineindex_stats ()
 Append the "$indexStats" stage.
pipelinelist_local_sessions (bsoncxx::v1::document::view v)
 Append the "$listLocalSessions" stage.
pipelinelist_sessions (bsoncxx::v1::document::view v)
 Append the "$listSessions" stage.
pipelinelookup (bsoncxx::v1::document::view v)
 Append the "$lookup" stage.
pipelinematch (bsoncxx::v1::document::view v)
 Append the "$match" stage.
pipelinemerge (bsoncxx::v1::document::view v)
 Append the "$merge" stage.
pipelineoperator= (pipeline &&other) noexcept
 Move assignment.
pipelineoperator= (pipeline const &other)
 Copy assignment.
pipelineout (bsoncxx::v1::stdx::string_view v)
 Append the "$out" stage.
pipelineproject (bsoncxx::v1::document::view v)
 Append the "$project" stage.
pipelineredact (bsoncxx::v1::document::view v)
 Append the "$redact" stage.
pipelinereplace_root (bsoncxx::v1::document::view v)
 Append the "$replaceRoot" stage.
pipelinesample (std::int32_t v)
 Append the "$sample" stage.
pipelinesort (bsoncxx::v1::document::view v)
 Append the "$sort" stage.
pipelinesort_by_count (bsoncxx::v1::document::view v)
 Append the "$sortByCount" stage.
pipelinesort_by_count (bsoncxx::v1::stdx::string_view v)
 Append the "$sortByCount" stage.
pipelineunwind (bsoncxx::v1::document::view v)
 Append the "$unwind" stage.
pipelineunwind (bsoncxx::v1::stdx::string_view v)
 Append the "$unwind" stage.
bsoncxx::v1::array::view view_array () const
 Return the current array of aggregation stages.
pipelinelimit (std::int32_t v)
 Append the "$limit" stage.
pipelinelimit (std::int64_t v)
 Append the "$limit" stage.
pipelineskip (std::int32_t v)
 Append the "$skip" stage.
pipelineskip (std::int64_t v)
 Append the "$skip" stage.

Constructor & Destructor Documentation

◆ ~pipeline()

mongocxx::v1::pipeline::~pipeline ( )

Destroy this object.

◆ pipeline() [1/3]

mongocxx::v1::pipeline::pipeline ( pipeline && other)
noexcept

Move constructor.

Postconditions:
  • other is in an assign-or-destroy-only state.

◆ pipeline() [2/3]

mongocxx::v1::pipeline::pipeline ( pipeline const & other)

Copy constructor.

◆ pipeline() [3/3]

mongocxx::v1::pipeline::pipeline ( )

Default initialization.

Postconditions:
  • this->view().empty() == true

Member Function Documentation

◆ add_fields()

pipeline & mongocxx::v1::pipeline::add_fields ( bsoncxx::v1::document::view v)

Append the "$addFields" stage.

◆ append_stage()

pipeline & mongocxx::v1::pipeline::append_stage ( bsoncxx::v1::document::view v)

Append the given aggregation stage.

◆ append_stages()

pipeline & mongocxx::v1::pipeline::append_stages ( bsoncxx::v1::array::view v)

Append an array of aggregation stages.

◆ bucket()

pipeline & mongocxx::v1::pipeline::bucket ( bsoncxx::v1::document::view v)

Append the "$bucket" stage.

◆ bucket_auto()

pipeline & mongocxx::v1::pipeline::bucket_auto ( bsoncxx::v1::document::view v)

Append the "$bucketAuto" stage.

◆ coll_stats() [1/2]

pipeline & mongocxx::v1::pipeline::coll_stats ( )

Append the "$collStats" stage with an empty document.

◆ coll_stats() [2/2]

pipeline & mongocxx::v1::pipeline::coll_stats ( bsoncxx::v1::document::view v)

Append the "$collStats" stage.

◆ count()

pipeline & mongocxx::v1::pipeline::count ( bsoncxx::v1::stdx::string_view v)

Append the "$count" stage.

◆ current_op()

pipeline & mongocxx::v1::pipeline::current_op ( bsoncxx::v1::document::view v)

Append the "$currentOp" stage.

◆ facet()

pipeline & mongocxx::v1::pipeline::facet ( bsoncxx::v1::document::view v)

Append the "$facet" stage.

◆ geo_near()

pipeline & mongocxx::v1::pipeline::geo_near ( bsoncxx::v1::document::view v)

Append the "$geoNear" stage.

◆ graph_lookup()

pipeline & mongocxx::v1::pipeline::graph_lookup ( bsoncxx::v1::document::view v)

Append the "$graphLookup" stage.

◆ group()

pipeline & mongocxx::v1::pipeline::group ( bsoncxx::v1::document::view v)

Append the "$group" stage.

◆ index_stats()

pipeline & mongocxx::v1::pipeline::index_stats ( )

Append the "$indexStats" stage.

◆ limit() [1/2]

pipeline & mongocxx::v1::pipeline::limit ( std::int32_t v)

Append the "$limit" stage.

◆ limit() [2/2]

pipeline & mongocxx::v1::pipeline::limit ( std::int64_t v)

Append the "$limit" stage.

◆ list_local_sessions()

pipeline & mongocxx::v1::pipeline::list_local_sessions ( bsoncxx::v1::document::view v)

Append the "$listLocalSessions" stage.

◆ list_sessions()

pipeline & mongocxx::v1::pipeline::list_sessions ( bsoncxx::v1::document::view v)

Append the "$listSessions" stage.

◆ lookup()

pipeline & mongocxx::v1::pipeline::lookup ( bsoncxx::v1::document::view v)

Append the "$lookup" stage.

◆ match()

pipeline & mongocxx::v1::pipeline::match ( bsoncxx::v1::document::view v)

Append the "$match" stage.

◆ merge()

pipeline & mongocxx::v1::pipeline::merge ( bsoncxx::v1::document::view v)

Append the "$merge" stage.

◆ operator=() [1/2]

pipeline & mongocxx::v1::pipeline::operator= ( pipeline && other)
noexcept

Move assignment.

Postconditions:
  • other is in an assign-or-destroy-only state.

◆ operator=() [2/2]

pipeline & mongocxx::v1::pipeline::operator= ( pipeline const & other)

Copy assignment.

◆ out()

pipeline & mongocxx::v1::pipeline::out ( bsoncxx::v1::stdx::string_view v)

Append the "$out" stage.

◆ project()

pipeline & mongocxx::v1::pipeline::project ( bsoncxx::v1::document::view v)

Append the "$project" stage.

◆ redact()

pipeline & mongocxx::v1::pipeline::redact ( bsoncxx::v1::document::view v)

Append the "$redact" stage.

◆ replace_root()

pipeline & mongocxx::v1::pipeline::replace_root ( bsoncxx::v1::document::view v)

Append the "$replaceRoot" stage.

◆ sample()

pipeline & mongocxx::v1::pipeline::sample ( std::int32_t v)

Append the "$sample" stage.

◆ skip() [1/2]

pipeline & mongocxx::v1::pipeline::skip ( std::int32_t v)

Append the "$skip" stage.

◆ skip() [2/2]

pipeline & mongocxx::v1::pipeline::skip ( std::int64_t v)

Append the "$skip" stage.

◆ sort()

pipeline & mongocxx::v1::pipeline::sort ( bsoncxx::v1::document::view v)

Append the "$sort" stage.

◆ sort_by_count() [1/2]

pipeline & mongocxx::v1::pipeline::sort_by_count ( bsoncxx::v1::document::view v)

Append the "$sortByCount" stage.

◆ sort_by_count() [2/2]

pipeline & mongocxx::v1::pipeline::sort_by_count ( bsoncxx::v1::stdx::string_view v)

Append the "$sortByCount" stage.

◆ unwind() [1/2]

pipeline & mongocxx::v1::pipeline::unwind ( bsoncxx::v1::document::view v)

Append the "$unwind" stage.

◆ unwind() [2/2]

pipeline & mongocxx::v1::pipeline::unwind ( bsoncxx::v1::stdx::string_view v)

Append the "$unwind" stage.

◆ view_array()

bsoncxx::v1::array::view mongocxx::v1::pipeline::view_array ( ) const

Return the current array of aggregation stages.


The documentation for this class was generated from the following file: