AWS documentdb documentation change
Summary
Entire documentation page for the $mod query operator has been removed, including examples and code samples
Security assessment
This change removes documentation for the $mod query operator but shows no evidence of addressing a security vulnerability. The removed content includes standard MongoDB query examples and connection strings with placeholders, but no security warnings, vulnerability disclosures, or security-related content was present in the removed material. This appears to be routine documentation cleanup or restructuring.
Diff
diff --git a/documentdb/latest/developerguide/mod-query.md b/documentdb/latest/developerguide/mod-query.md index 521d670f1..8b1378917 100644 --- a//documentdb/latest/developerguide/mod-query.md +++ b//documentdb/latest/developerguide/mod-query.md @@ -1 +0,0 @@ -[](/pdfs/documentdb/latest/developerguide/developerguide.pdf#mod-query "Open PDF") @@ -3,108 +1,0 @@ -[Documentation](/index.html)[Amazon DocumentDB](/documentdb/index.html)[Developer Guide](what-is.html) - -Example (MongoDB Shell)Code examples - -# $mod - -The `$mod` query operator selects documents where a field value divided by a divisor has a specified remainder. This is useful for filtering documents based on modulo arithmetic conditions. - -**Parameters** - - * `divisor`: The number to divide by. - - * `remainder`: The expected remainder value. - - - - -## Example (MongoDB Shell) - -The following example demonstrates using the `$mod` operator to find all orders where the quantity is an odd number. - -**Create sample documents** - - - db.orders.insertMany([ - { _id: 1, item: "Widget", quantity: 15 }, - { _id: 2, item: "Gadget", quantity: 20 }, - { _id: 3, item: "Tool", quantity: 7 }, - { _id: 4, item: "Device", quantity: 12 }, - { _id: 5, item: "Part", quantity: 9 } - ]); - -**Query example** - - - db.orders.find({ quantity: { $mod: [2, 1] } }); - -**Output** - - - { "_id" : 1, "item" : "Widget", "quantity" : 15 } - { "_id" : 3, "item" : "Tool", "quantity" : 7 } - { "_id" : 5, "item" : "Part", "quantity" : 9 } - -This query returns documents where the quantity divided by 2 has a remainder of 1, effectively selecting all odd quantities. - -## Code examples - -To view a code example for using the `$mod` query operator, 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('orders'); - - const result = await collection.find({ quantity: { $mod: [2, 1] } }).toArray(); - - console.log(JSON.stringify(result, null, 2)); - 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['orders'] - - result = list(collection.find({'quantity': {'$mod': [2, 1]}})) - - 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) - -$lt - -$lte - -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.