AWS documentdb documentation change
Summary
Entire documentation page for the $toDouble operator in Amazon DocumentDB has been removed, including all examples, code samples, and usage instructions.
Security assessment
The change removes documentation for a MongoDB aggregation operator ($toDouble) but shows no evidence of addressing a security vulnerability, weakness, or incident. The removed content was purely functional documentation about type conversion. The examples included TLS connection parameters, but their removal doesn't indicate a security fix.
Diff
diff --git a/documentdb/latest/developerguide/toDouble.md b/documentdb/latest/developerguide/toDouble.md index 30b30aa7b..8b1378917 100644 --- a//documentdb/latest/developerguide/toDouble.md +++ b//documentdb/latest/developerguide/toDouble.md @@ -1 +0,0 @@ -[](/pdfs/documentdb/latest/developerguide/developerguide.pdf#toDouble "Open PDF") @@ -3,130 +1,0 @@ -[Documentation](/index.html)[Amazon DocumentDB](/documentdb/index.html)[Developer Guide](what-is.html) - -Example (MongoDB Shell)Code examples - -# $toDouble - -New from version 4.0 - -The `$toDouble` operator in Amazon DocumentDB is used to convert a value to a double-precision 64-bit floating-point number. This can be useful when you need to perform arithmetic operations on values that are not originally in a numeric format. - -**Parameters** - -`<expression>`: The expression to convert to a double value. This can be any valid expression that resolves to a numeric, string, or boolean value. - -## Example (MongoDB Shell) - -This example demonstrates how to use the `$toDouble` operator to convert a string value to a numeric value for the purpose of performing a mathematical calculation. - -**Create sample documents** - - - db.numbers.insertMany([ - { _id: 1, value: "10.5" }, - { _id: 2, value: "20.25" }, - { _id: 3, value: "7" } - ]) - -**Query example** - - - db.numbers.aggregate([ - { - $project: { - _id: 1, - value: 1, - double_value: { $toDouble: "$value" }, - double_plus_five: { $add: [{ $toDouble: "$value" }, 5] } - } - } - ]) - -**Output** - - - [ - { "_id" : 1, "value" : "10.5", "double_value" : 10.5, "double_plus_five" : 15.5 }, - { "_id" : 2, "value" : "20.25", "double_value" : 20.25, "double_plus_five" : 25.25 }, - { "_id" : 3, "value" : "7", "double_value" : 7.0, "double_plus_five" : 12.0 } - ] - -## Code examples - -To view a code example for using the `$toDouble` command, choose the tab for the language that you want to use: - -Node.js - - - - const { MongoClient } = require('mongodb'); - - async function example() { - 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 collection = db.collection('numbers'); - - const result = await collection.aggregate([ - { - $project: { - _id: 1, - value: 1, - double_value: { $toDouble: "$value" }, - double_plus_five: { $add: [{ $toDouble: "$value" }, 5] } - } - } - ]).toArray(); - - console.log(result); - await client.close(); - } - - example(); - -Python - - - - from pymongo import MongoClient - - def example(): - client = MongoClient('mongodb://<username>:<password>@<cluster-endpoint>:27017/?tls=true&tlsCAFile=global-bundle.pem&replicaSet=rs0&readPreference=secondaryPreferred&retryWrites=false') - db = client['test'] - collection = db['numbers'] - - result = list(collection.aggregate([ - { - '$project': { - '_id': 1, - 'value': 1, - 'double_value': { '$toDouble': '$value' }, - 'double_plus_five': { '$add': [{ '$toDouble': '$value' }, 5] } - } - } - ])) - - print(result) - client.close() - - example() - - **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) - -$toDecimal - -$toInt - -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.