summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/document_source_graph_lookup.cpp
diff options
context:
space:
mode:
authorclang-format-7.0.1 <adam.martin@10gen.com>2019-07-26 18:20:35 -0400
committerADAM David Alan Martin <adam.martin@10gen.com>2019-07-27 11:02:23 -0400
commit134a4083953270e8a11430395357fb70a29047ad (patch)
treedd428e1230e31d92b20b393dfdc17ffe7fa79cb6 /src/mongo/db/pipeline/document_source_graph_lookup.cpp
parent1e46b5049003f427047e723ea5fab15b5a9253ca (diff)
downloadmongo-134a4083953270e8a11430395357fb70a29047ad.tar.gz
SERVER-41772 Apply clang-format 7.0.1 to the codebase
Diffstat (limited to 'src/mongo/db/pipeline/document_source_graph_lookup.cpp')
-rw-r--r--src/mongo/db/pipeline/document_source_graph_lookup.cpp25
1 files changed, 11 insertions, 14 deletions
diff --git a/src/mongo/db/pipeline/document_source_graph_lookup.cpp b/src/mongo/db/pipeline/document_source_graph_lookup.cpp
index 471f93f04f0..c96ac4b4114 100644
--- a/src/mongo/db/pipeline/document_source_graph_lookup.cpp
+++ b/src/mongo/db/pipeline/document_source_graph_lookup.cpp
@@ -211,8 +211,7 @@ void DocumentSourceGraphLookUp::doBreadthFirstSearch() {
while (auto next = pipeline->getNext()) {
uassert(40271,
str::stream()
- << "Documents in the '"
- << _from.ns()
+ << "Documents in the '" << _from.ns()
<< "' namespace must contain an _id for de-duplication in $graphLookup",
!(*next)["_id"].missing());
@@ -392,10 +391,8 @@ void DocumentSourceGraphLookUp::serializeToArray(
std::vector<Value>& array, boost::optional<ExplainOptions::Verbosity> explain) const {
// Serialize default options.
MutableDocument spec(DOC("from" << _from.coll() << "as" << _as.fullPath() << "connectToField"
- << _connectToField.fullPath()
- << "connectFromField"
- << _connectFromField.fullPath()
- << "startWith"
+ << _connectToField.fullPath() << "connectFromField"
+ << _connectFromField.fullPath() << "startWith"
<< _startWith->serialize(false)));
// depthField is optional; serialize it if it was specified.
@@ -414,10 +411,10 @@ void DocumentSourceGraphLookUp::serializeToArray(
// If we are explaining, include an absorbed $unwind inside the $graphLookup specification.
if (_unwind && explain) {
const boost::optional<FieldPath> indexPath = (*_unwind)->indexPath();
- spec["unwinding"] = Value(DOC("preserveNullAndEmptyArrays"
- << (*_unwind)->preserveNullAndEmptyArrays()
- << "includeArrayIndex"
- << (indexPath ? Value((*indexPath).fullPath()) : Value())));
+ spec["unwinding"] =
+ Value(DOC("preserveNullAndEmptyArrays"
+ << (*_unwind)->preserveNullAndEmptyArrays() << "includeArrayIndex"
+ << (indexPath ? Value((*indexPath).fullPath()) : Value())));
}
array.push_back(Value(DOC(getSourceName() << spec.freeze())));
@@ -550,8 +547,8 @@ intrusive_ptr<DocumentSource> DocumentSourceGraphLookUp::createFromBson(
argName == "depthField" || argName == "connectToField") {
// All remaining arguments to $graphLookup are expected to be strings.
uassert(40103,
- str::stream() << "expected string as argument for " << argName << ", found: "
- << argument.toString(false, false),
+ str::stream() << "expected string as argument for " << argName
+ << ", found: " << argument.toString(false, false),
argument.type() == String);
}
@@ -567,8 +564,8 @@ intrusive_ptr<DocumentSource> DocumentSourceGraphLookUp::createFromBson(
depthField = boost::optional<FieldPath>(FieldPath(argument.String()));
} else {
uasserted(40104,
- str::stream() << "Unknown argument to $graphLookup: "
- << argument.fieldName());
+ str::stream()
+ << "Unknown argument to $graphLookup: " << argument.fieldName());
}
}