AWS documentdb documentation change
Summary
Entire documentation page for the $allElementsTrue operator has been removed, including all examples, code samples, and explanatory content.
Security assessment
This change removes documentation content entirely without any indication of security vulnerabilities, patches, or security-related updates. The removed content appears to be standard operator documentation with code examples. There is no evidence of security fixes, vulnerability disclosures, or security feature additions in the diff.
Diff
diff --git a/documentdb/latest/developerguide/allElementsTrue.md b/documentdb/latest/developerguide/allElementsTrue.md index 473947512..8b1378917 100644 --- a//documentdb/latest/developerguide/allElementsTrue.md +++ b//documentdb/latest/developerguide/allElementsTrue.md @@ -1 +0,0 @@ -[](/pdfs/documentdb/latest/developerguide/developerguide.pdf#allElementsTrue "Open PDF") @@ -3,115 +1,0 @@ -[Documentation](/index.html)[Amazon DocumentDB](/documentdb/index.html)[Developer Guide](what-is.html) - -Example (MongoDB Shell)Code examples - -# $allElementsTrue - -New from version 4.0 - -The `$allElementsTrue` operator is used to check if all elements in an array evaluate to a true value. - -**Parameters** - - * `expression`: An expression that evaluates to an array. - - - - -## Example (MongoDB Shell) - -The following example demonstrates the usage of `$allElementsTrue` to check if all elements in an array are true. - -**Create sample documents** - - - db.collection.insert([ - { "name": "John", "scores": [100, 90, 80] }, - { "name": "Jane", "scores": [80, 85, 0] }, - { "name": "Bob", "scores": [90, 95, null] } - ]) - -**Query example** - - - db.collection.find({ - "scores": { "$allElementsTrue": [{ "$gt": 0 }] } - }) - -**Output** - - - [ - { "_id" : ObjectId("..."), "name" : "John", "scores" : [ 100, 90, 80 ] }, - { "_id" : ObjectId("..."), "name" : "Bob", "scores" : [ 90, 95, null ] } - ] - -In this example, the query checks if all elements in the `scores` array are greater than 0. The document with `"name": "Jane"` is excluded because the `scores` array contains a 0, which is a falsy value. - -## Code examples - -To view a code example for using the `$allElementsTrue` 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('collection'); - - const result = await collection.find({ - "scores": { "$allElementsTrue": [{ "$gt": 0 }] } - }).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['collection'] - - result = list(collection.find({ - "scores": {"$allElementsTrue": [{"$gt": 0}]} - })) - - 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) - -$addFields - -$and - -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.