Loading...
Searching...
No Matches
pipeline.hpp
Go to the documentation of this file.
// Copyright 2009-present MongoDB, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#pragma once
#include <mongocxx/v1/pipeline-fwd.hpp> // IWYU pragma: export
//
#include <mongocxx/v1/detail/prelude.hpp>
#include <bsoncxx/v1/array/view-fwd.hpp>
#include <bsoncxx/v1/document/view-fwd.hpp>
#include <bsoncxx/v1/stdx/string_view.hpp>
#include <mongocxx/v1/config/export.hpp>
#include <cstdint>
namespace mongocxx {
namespace v1 {
class pipeline {
private:
class impl;
void* _impl;
public:
MONGOCXX_ABI_EXPORT_CDECL() ~pipeline();
MONGOCXX_ABI_EXPORT_CDECL() pipeline(pipeline&& other) noexcept;
MONGOCXX_ABI_EXPORT_CDECL(pipeline&) operator=(pipeline&& other) noexcept;
MONGOCXX_ABI_EXPORT_CDECL() pipeline(pipeline const& other);
MONGOCXX_ABI_EXPORT_CDECL(pipeline&) operator=(pipeline const& other);
MONGOCXX_ABI_EXPORT_CDECL() pipeline();
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::array::view) view_array() const;
MONGOCXX_ABI_EXPORT_CDECL(pipeline&) append_stage(bsoncxx::v1::document::view v);
MONGOCXX_ABI_EXPORT_CDECL(pipeline&) append_stages(bsoncxx::v1::array::view v);
MONGOCXX_ABI_EXPORT_CDECL(pipeline&) add_fields(bsoncxx::v1::document::view v);
MONGOCXX_ABI_EXPORT_CDECL(pipeline&) bucket(bsoncxx::v1::document::view v);
MONGOCXX_ABI_EXPORT_CDECL(pipeline&) bucket_auto(bsoncxx::v1::document::view v);
MONGOCXX_ABI_EXPORT_CDECL(pipeline&) coll_stats(bsoncxx::v1::document::view v);
MONGOCXX_ABI_EXPORT_CDECL(pipeline&) coll_stats();
MONGOCXX_ABI_EXPORT_CDECL(pipeline&) count(bsoncxx::v1::stdx::string_view v);
MONGOCXX_ABI_EXPORT_CDECL(pipeline&) current_op(bsoncxx::v1::document::view v);
MONGOCXX_ABI_EXPORT_CDECL(pipeline&) facet(bsoncxx::v1::document::view v);
MONGOCXX_ABI_EXPORT_CDECL(pipeline&) geo_near(bsoncxx::v1::document::view v);
MONGOCXX_ABI_EXPORT_CDECL(pipeline&) graph_lookup(bsoncxx::v1::document::view v);
MONGOCXX_ABI_EXPORT_CDECL(pipeline&) group(bsoncxx::v1::document::view v);
MONGOCXX_ABI_EXPORT_CDECL(pipeline&) index_stats();
MONGOCXX_ABI_EXPORT_CDECL(pipeline&) limit(std::int32_t v);
MONGOCXX_ABI_EXPORT_CDECL(pipeline&) limit(std::int64_t v);
MONGOCXX_ABI_EXPORT_CDECL(pipeline&) list_local_sessions(bsoncxx::v1::document::view v);
MONGOCXX_ABI_EXPORT_CDECL(pipeline&) list_sessions(bsoncxx::v1::document::view v);
MONGOCXX_ABI_EXPORT_CDECL(pipeline&) lookup(bsoncxx::v1::document::view v);
MONGOCXX_ABI_EXPORT_CDECL(pipeline&) match(bsoncxx::v1::document::view v);
MONGOCXX_ABI_EXPORT_CDECL(pipeline&) merge(bsoncxx::v1::document::view v);
MONGOCXX_ABI_EXPORT_CDECL(pipeline&) out(bsoncxx::v1::stdx::string_view v);
MONGOCXX_ABI_EXPORT_CDECL(pipeline&) project(bsoncxx::v1::document::view v);
MONGOCXX_ABI_EXPORT_CDECL(pipeline&) redact(bsoncxx::v1::document::view v);
MONGOCXX_ABI_EXPORT_CDECL(pipeline&) replace_root(bsoncxx::v1::document::view v);
MONGOCXX_ABI_EXPORT_CDECL(pipeline&) sample(std::int32_t v);
MONGOCXX_ABI_EXPORT_CDECL(pipeline&) skip(std::int32_t v);
MONGOCXX_ABI_EXPORT_CDECL(pipeline&) skip(std::int64_t v);
MONGOCXX_ABI_EXPORT_CDECL(pipeline&) sort(bsoncxx::v1::document::view v);
MONGOCXX_ABI_EXPORT_CDECL(pipeline&) sort_by_count(bsoncxx::v1::document::view v);
MONGOCXX_ABI_EXPORT_CDECL(pipeline&) sort_by_count(bsoncxx::v1::stdx::string_view v);
MONGOCXX_ABI_EXPORT_CDECL(pipeline&) unwind(bsoncxx::v1::document::view v);
MONGOCXX_ABI_EXPORT_CDECL(pipeline&) unwind(bsoncxx::v1::stdx::string_view v);
class internal;
};
} // namespace v1
} // namespace mongocxx
#include <mongocxx/v1/detail/postlude.hpp>
mongocxx::v1::pipeline::coll_stats
pipeline & coll_stats(bsoncxx::v1::document::view v)
Append the "$collStats" stage.
mongocxx::v1::pipeline::skip
pipeline & skip(std::int32_t v)
Append the "$skip" stage.
mongocxx::v1::pipeline::append_stage
pipeline & append_stage(bsoncxx::v1::document::view v)
Append the given aggregation stage.
mongocxx::v1::pipeline::index_stats
pipeline & index_stats()
Append the "$indexStats" stage.
mongocxx::v1::pipeline::current_op
pipeline & current_op(bsoncxx::v1::document::view v)
Append the "$currentOp" stage.
mongocxx::v1::pipeline::~pipeline
~pipeline()
Destroy this object.
mongocxx::v1::pipeline::out
pipeline & out(bsoncxx::v1::stdx::string_view v)
Append the "$out" stage.
mongocxx::v1::pipeline::pipeline
pipeline(pipeline &&other) noexcept
Move constructor.
mongocxx::v1::pipeline::graph_lookup
pipeline & graph_lookup(bsoncxx::v1::document::view v)
Append the "$graphLookup" stage.
mongocxx::v1::pipeline::project
pipeline & project(bsoncxx::v1::document::view v)
Append the "$project" stage.
mongocxx::v1::pipeline::list_sessions
pipeline & list_sessions(bsoncxx::v1::document::view v)
Append the "$listSessions" stage.
mongocxx::v1::pipeline::limit
pipeline & limit(std::int32_t v)
Append the "$limit" stage.
mongocxx::v1::pipeline::bucket_auto
pipeline & bucket_auto(bsoncxx::v1::document::view v)
Append the "$bucketAuto" stage.
mongocxx::v1::pipeline::facet
pipeline & facet(bsoncxx::v1::document::view v)
Append the "$facet" stage.
mongocxx::v1::pipeline::unwind
pipeline & unwind(bsoncxx::v1::document::view v)
Append the "$unwind" stage.
mongocxx::v1::pipeline::redact
pipeline & redact(bsoncxx::v1::document::view v)
Append the "$redact" stage.
mongocxx::v1::pipeline::match
pipeline & match(bsoncxx::v1::document::view v)
Append the "$match" stage.
mongocxx::v1::pipeline::geo_near
pipeline & geo_near(bsoncxx::v1::document::view v)
Append the "$geoNear" stage.
mongocxx::v1::pipeline::sample
pipeline & sample(std::int32_t v)
Append the "$sample" stage.
mongocxx::v1::pipeline::list_local_sessions
pipeline & list_local_sessions(bsoncxx::v1::document::view v)
Append the "$listLocalSessions" stage.
mongocxx::v1::pipeline::count
pipeline & count(bsoncxx::v1::stdx::string_view v)
Append the "$count" stage.
mongocxx::v1::pipeline::merge
pipeline & merge(bsoncxx::v1::document::view v)
Append the "$merge" stage.
mongocxx::v1::pipeline::bucket
pipeline & bucket(bsoncxx::v1::document::view v)
Append the "$bucket" stage.
mongocxx::v1::pipeline::append_stages
pipeline & append_stages(bsoncxx::v1::array::view v)
Append an array of aggregation stages.
mongocxx::v1::pipeline::group
pipeline & group(bsoncxx::v1::document::view v)
Append the "$group" stage.
mongocxx::v1::pipeline::sort_by_count
pipeline & sort_by_count(bsoncxx::v1::document::view v)
Append the "$sortByCount" stage.
mongocxx::v1::pipeline::add_fields
pipeline & add_fields(bsoncxx::v1::document::view v)
Append the "$addFields" stage.
mongocxx::v1::pipeline::replace_root
pipeline & replace_root(bsoncxx::v1::document::view v)
Append the "$replaceRoot" stage.
mongocxx::v1::pipeline::lookup
pipeline & lookup(bsoncxx::v1::document::view v)
Append the "$lookup" stage.
mongocxx::v1::pipeline::sort
pipeline & sort(bsoncxx::v1::document::view v)
Append the "$sort" stage.
mongocxx::v1::pipeline::view_array
bsoncxx::v1::array::view view_array() const
Return the current array of aggregation stages.
export.hpp
Provides macros to control the set of symbols exported in the ABI.
MONGOCXX_ABI_EXPORT_CDECL
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition export.hpp:52
prelude.hpp
The mongocxx v1 macro guard prelude header.
bsoncxx
The top-level namespace within which all bsoncxx library entities are declared.
mongocxx::v1
Declares entities whose ABI stability is guaranteed for documented symbols.
mongocxx
The top-level namespace within which all mongocxx library entities are declared.
view-fwd.hpp
Declares bsoncxx::v1::array::view.
view-fwd.hpp
Declares bsoncxx::v1::document::view.
pipeline-fwd.hpp
Declares mongocxx::v1::pipeline.
string_view.hpp
Provides std::string_view-related polyfills for library API usage.