AWS documentdb documentation change
Summary
Entire documentation page for the $concat aggregation operator was removed, including examples in MongoDB Shell, Node.js, and Python.
Security assessment
This change removes documentation about the $concat operator, which is used for string concatenation in aggregation pipelines. There is no evidence in the diff that this removal addresses a security vulnerability or weakness. The change appears to be routine documentation cleanup or restructuring, similar to the comment.md removal.
Diff
diff --git a/documentdb/latest/developerguide/concat.md b/documentdb/latest/developerguide/concat.md index 79cf63545..8b1378917 100644 --- a//documentdb/latest/developerguide/concat.md +++ b//documentdb/latest/developerguide/concat.md @@ -1 +0,0 @@ -[](/pdfs/documentdb/latest/developerguide/developerguide.pdf#concat "Open PDF") @@ -3,112 +1,0 @@ -[Documentation](/index.html)[Amazon DocumentDB](/documentdb/index.html)[Developer Guide](what-is.html) - -Example (MongoDB Shell)Code examples - -# $concat - -The `$concat` aggregation operator in Amazon DocumentDB concatenates (or combines) multiple strings in a document to produce a single string that can be returned to the application. This reduces the work done in the application, as the string manipulation is performed at the database level. - -**Parameters** - - * `expression1`: The first string to concatenate. - - * `expression2`: The second string to concatenate. - - * `...`: Additional strings to concatenate (optional). - - - - -## Example (MongoDB Shell) - -In this example, we concatenate the first and last names of users to produce each person's full name. - -**Create sample documents** - - - db.people.insertMany([ - { "_id":1, "first_name":"Jane", "last_name":"Doe", "DOB":"2/1/1999", "Desk": "MSP102-MN"}, - { "_id":2, "first_name":"John", "last_name":"Doe", "DOB":"12/21/1992", "Desk": "DSM301-IA"}, - { "_id":3, "first_name":"Steve", "last_name":"Smith", "DOB":"3/21/1981", "Desk":"MKE233-WI"} - ]) - -**Query example** - - - db.people.aggregate([ - { $project: { full_name: { $concat: [ "$first_name", " ", "$last_name"] } } } - ]) - -**Output** - - - { "_id" : 1, "full_name" : "Jane Doe" } - { "_id" : 2, "full_name" : "John Doe" } - { "_id" : 3, "full_name" : "Steve Smith" } - -## Code examples - -To view a code example for using the `$concat` command, choose the tab for the language that you want to use: - -Node.js - - - - const { MongoClient } = require('mongodb'); - - async function concatenateNames() { - const client = await MongoClient.connect('mongodb://<username>:<password>@<cluster-endpoint>:27017/?tls=true&tlsCAFile=global-bundle.pem&replicaSet=rs0&readPreference=secondaryPreferred&retryWrites=false'); - const db = client.db('test'); - - const result = await db.collection('people').aggregate([ - { $project: { full_name: { $concat: [ "$first_name", " ", "$last_name"] } } } - ]).toArray(); - - console.log(result); - - await client.close(); - } - - concatenateNames(); - -Python - - - - from pymongo import MongoClient - - def concatenate_names(): - client = MongoClient('mongodb://<username>:<password>@<cluster-endpoint>:27017/?tls=true&tlsCAFile=global-bundle.pem&replicaSet=rs0&readPreference=secondaryPreferred&retryWrites=false') - db = client['test'] - - result = list(db.people.aggregate([ - { '$project': { 'full_name': { '$concat': [ '$first_name', ' ', '$last_name' ] } } } - ])) - - print(result) - - client.close() - - concatenate_names() - - **Javascript is disabled or is unavailable in your browser.** - -To use the Amazon Web Services Documentation, Javascript must be enabled. Please refer to your browser's Help pages for instructions. - -[Document Conventions](/general/latest/gr/docconventions.html) - -$collStats - -$concatArrays - -Did this page help you? - Yes - -Thanks for letting us know we're doing a good job! - -If you've got a moment, please tell us what we did right so we can do more of it. - -Did this page help you? - No - -Thanks for letting us know this page needs work. We're sorry we let you down. - -If you've got a moment, please tell us how we can make the documentation better.