├── .github ├── pull_request_template.md └── workflows │ ├── find-unused.yml │ └── vale-tdbx.yml ├── .static └── logo-mongodb.png ├── CONTRUBUTING.md ├── README.rst ├── REVIEWING.md ├── build.sh ├── config └── redirects ├── netlify.toml ├── snooty.toml ├── source ├── about-compatibility.txt ├── cosmosdb-support.txt ├── csharp-drivers.txt ├── documentdb-support.txt ├── facets.toml ├── figures │ ├── M220J_hero.jpg │ ├── M220P_hero.jpg │ ├── PHP_driver_architecture.svg │ ├── cosmosdb.png │ └── documentdb.png ├── icons │ ├── c++.svg │ ├── c.svg │ ├── csharp.svg │ ├── elixir.svg │ ├── go.svg │ ├── java-dark.svg │ ├── java.svg │ ├── kotlin.svg │ ├── mongoose.svg │ ├── node-dark.svg │ ├── node.svg │ ├── php.svg │ ├── prisma-dark.svg │ ├── prisma.svg │ ├── python.svg │ ├── r.svg │ ├── ruby.svg │ ├── rust-dark.svg │ ├── rust.svg │ ├── scala.svg │ ├── swift.svg │ └── ts.svg ├── includes │ ├── about-driver-compatibility.rst │ ├── atlas-connect-blurb.rst │ ├── connection-snippets │ │ └── scram │ │ │ ├── py-motor-connection-no-stableapi.py │ │ │ ├── py-motor-connection-tornado.py │ │ │ └── py-motor-connection.py │ ├── fact-environments.rst │ ├── help-links-general.rst │ ├── help-links-motor.rst │ ├── help-links-php.rst │ ├── help-links-swift.rst │ ├── language-compatibility-table-motor.rst │ ├── language-compatibility-table-swift.rst │ ├── localhost-connection.rst │ ├── mongodb-compatibility-table-motor.rst │ ├── mongodb-compatibility-table-swift.rst │ ├── older-server-versions-unsupported.rst │ ├── php-frameworks │ │ └── symfony │ │ │ ├── Restaurant.php │ │ │ ├── RestaurantController.php │ │ │ ├── app_render.png │ │ │ ├── browse.html.twig │ │ │ ├── doctrine_mongodb.yaml │ │ │ └── index.html.twig │ ├── serverless-compatibility.rst │ ├── stable-api-notice.rst │ └── university-m220p.rst ├── index.txt ├── java-drivers.txt ├── kotlin-drivers.txt ├── kotlin.md ├── motor.txt ├── odm.txt ├── other-document-dbs.txt ├── php-drivers.txt ├── php-frameworks │ ├── drupal.txt │ └── symfony.txt ├── php-libraries.txt ├── python-drivers.txt ├── ruby-drivers.txt ├── swift.txt └── typescript.txt └── worker.sh /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | # Pull Request Info 2 | 3 | [PR Reviewing Guidelines](https://github.com/mongodb/docs-ecosystem/blob/master/REVIEWING.md) 4 | 5 | JIRA - 6 | Staging - 7 | 8 | ## Self-Review Checklist 9 | 10 | - [ ] Is this free of any warnings or errors in the RST? 11 | - [ ] Did you run a spell-check? 12 | - [ ] Did you run a grammar-check? 13 | - [ ] Are all the links working? 14 | - [ ] Are the [facets and meta keywords](https://wiki.corp.mongodb.com/display/DE/Docs+Taxonomy) accurate? 15 | -------------------------------------------------------------------------------- /.github/workflows/find-unused.yml: -------------------------------------------------------------------------------- 1 | name: Find Unused Files 2 | 3 | on: 4 | pull_request: 5 | paths: 6 | - "source/**" 7 | 8 | jobs: 9 | check: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v3 13 | - uses: cbush/docdoctor/actions/find-unused@main 14 | with: 15 | source: ./source 16 | -------------------------------------------------------------------------------- /.github/workflows/vale-tdbx.yml: -------------------------------------------------------------------------------- 1 | name: Vale Check 2 | on: 3 | pull_request: 4 | paths: 5 | - "source/**" 6 | 7 | jobs: 8 | vale: 9 | name: TDBX Vale rules 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: checkout 13 | uses: actions/checkout@master 14 | 15 | - name: Install docutils 16 | run: sudo apt-get install -y docutils 17 | 18 | - id: files 19 | uses: masesgroup/retrieve-changed-files@v2 20 | with: 21 | format: "csv" 22 | 23 | - name: checkout-latest-rules 24 | uses: actions/checkout@master 25 | with: 26 | repository: mongodb/mongodb-vale-action 27 | path: "./tdbx-vale-rules" 28 | token: ${{secrets.GITHUB_TOKEN}} 29 | 30 | - name: move-files-for-vale-action 31 | run: | 32 | cp tdbx-vale-rules/.vale.ini .vale.ini 33 | mkdir -p .github/styles/ 34 | cp -rf tdbx-vale-rules/.github/styles/ .github/ 35 | 36 | - if: steps.get_changed_files.outputs.all_changed_files != '' 37 | uses: errata-ai/vale-action@reviewdog 38 | with: 39 | files: ${{steps.files.outputs.added_modified}} 40 | separator: "," 41 | filter_mode: diff_context 42 | reporter: github-pr-review 43 | fail_on_error: true 44 | token: ${{ secrets.GITHUB_TOKEN }} 45 | 46 | - name: run-vale 47 | uses: errata-ai/vale-action@reviewdog 48 | with: 49 | reporter: github-pr-check 50 | files: ${{steps.files.outputs.added_modified}} 51 | fail_on_error: true 52 | token: ${{secrets.GITHUB_TOKEN}} 53 | -------------------------------------------------------------------------------- /.static/logo-mongodb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/docs-ecosystem/1d0a7b4828ea970109c6b5780b3a660ca544989b/.static/logo-mongodb.png -------------------------------------------------------------------------------- /CONTRUBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to `docs-ecosystem`📝 2 | 3 | Thank you for your interest in contributing to `docs-ecosystem`! In this 4 | guide, you can find guidelines for contributing to the MongoDB Drivers 5 | Ecosystem documentation. 6 | 7 | You might want to contribute to this repository to fix a bug 8 | or error in the documentation, or if you want to add information about a 9 | feature or concept that is not currently covered. See the following 10 | section to learn more about how you can suggest changes and additions. 11 | 12 | > **NOTE:** This documentation is open-source but wholly managed by the Drivers & 13 | > Connectors Documentation team at MongoDB. If you have any questions 14 | > about the documentation, contributions, or other topics, you can 15 | > contact someone on our team by emailing 16 | > [deved-team\@10gen.com](mailto:deved-team@10gen.com). 17 | 18 | ## How can I contribute? 📤 19 | 20 | The Drivers & Connectors Documentation team uses GitHub to manage and 21 | review all changes. To suggest any changes, you should create a **ticket** 22 | and then open a **pull request** against this repository. 23 | 24 | ### Creating a ticket ✉️ 25 | 26 | Our team uses JIRA, a project management software, to track issues and 27 | feature requests in the form of tickets. Before you make any changes, 28 | consider looking for [an existing 29 | ticket](https://jira.mongodb.org/projects/DOCS/issues/) in our JIRA 30 | project that addresses your idea or bug fix request. 31 | 32 | If you don't find an appropriate ticket, you can create a ticket in the 33 | `DOCS` JIRA project that describes the bug, issue, or content request. 34 | In your ticket, please include the following details: 35 | 36 | - Who you are 37 | - A description of the bug/issue/feature/explanation 38 | - The changes you plan to make 39 | 40 | Please also fill out the following ticket fields: 41 | 42 | - Issue Type: Bug/Task 43 | - A bug is an error in the documentation. For example, if you notice a 44 | typo or an error in a code example, mark the ticket as a `Bug` 45 | - A `Task` is not a `Bug`. For example, if you want to add more detail to a 46 | topic explanation, mark the ticket as an `Improvement`. 47 | - Summary: The ticket's title 48 | - Component: `Drivers` 49 | 50 | Once you create the ticket, you can either decide to let us process the 51 | ticket and make the pull request, or open the PR yourself. 52 | 53 | ### Opening a PR 🖇️ 54 | 55 | To develop a PR, you can clone the `docs-ecosystem` repository and create a 56 | branch off of `master`. It is helpful if your branch name contains some 57 | details about the changes, such as `query-code-bug-fix` or 58 | `add-timeseries-explanation`. 59 | 60 | After you push your changes, open a PR against the `master` branch and 61 | fill out the template with details such as the corresponding ticket link 62 | and the self-review checklist. 63 | 64 | > **NOTE:** You will not be able to see your changes in a staging 65 | > environment. When a team member is reviewing your PR, we might be able 66 | > to add a staging link so that we can visualize the changes. 67 | 68 | Once you have created a pull request, **do not automatically merge**. 69 | Wait for a team member to take further action. 70 | 71 | ### Next steps ⏰ 72 | 73 | You can expect that someone on our team will see the ticket and/or PR 74 | **within one week**. After this, they will leave a review on the PR which 75 | you can respond to, or they will take over the PR and manage it 76 | internally by merging changes into a new PR or addressing the ticket 77 | through a different approach. 78 | 79 | Thank you again for being interested in our documentation! 🙂 80 | 81 | ## Useful Links 🔗 82 | 83 | - [MongoDB Documentation Style 84 | Guide](https://www.mongodb.com/docs/meta/style-guide/): This guide 85 | describes best practices for write documentation relating to grammar, style, 86 | terminology, and more. 87 | - [MongoDB Documentation Site](https://www.mongodb.com/docs/): The 88 | landing page for all MongoDB documentation. 89 | - [MongoDB Client Libraries](https://www.mongodb.com/docs/drivers/): The 90 | landing page for MongoDB drivers. 91 | - [All Open DOCS JIRA 92 | Issues](https://jira.mongodb.org/projects/DOCS/issues/DOCS-15871?filter=allopenissues): 93 | The list of open documentation tickets in JIRA. 94 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | =============================== 2 | MongoDB Ecosystem Documentation 3 | =============================== 4 | 5 | This repository contains documentation for the MongoDB drivers ecosystem site: https://www.mongodb.com/docs/drivers/ 6 | 7 | Contribute to this Documentation 8 | -------------------------------- 9 | 10 | To learn about contributing to this documentation, see the `contributing guidelines `__. 11 | 12 | File JIRA Tickets 13 | ----------------- 14 | 15 | Please file issue reports or requests at the `Documentation Jira Project 16 | `_. 17 | 18 | Licenses 19 | -------- 20 | 21 | All documentation is available under the terms of a `Creative Commons 22 | License `_. 23 | 24 | The MongoDB Documentation Project is governed by the terms of the 25 | `MongoDB Contributor Agreement 26 | `_. 27 | 28 | -- The MongoDB Docs Team 29 | -------------------------------------------------------------------------------- /REVIEWING.md: -------------------------------------------------------------------------------- 1 | # Pull Request Reviewing Guidelines for the Driver Ecosystem Documentation 2 | 3 | Contributions to the set of documents in this repository can receive reviews from one or both of the following types of reviews: 4 | 5 | 1. A **copy review**, which focuses on information structure and wording; typically performed by a MongoDB Documentation Team member 6 | 2. A **technical review**, which addresses code snippets and the technical correctness of prose, typically performed by a MongoDB engineer. 7 | 8 | # Which Types of Changes for which to Request a Technical Review 9 | 10 | - When the PR changes include code snippets. 11 | - When the PR changes include release notes, breaking changes, or upgrading versions. 12 | - To get alignment on specific wording of descriptions of technical information, especially for new features. 13 | - If in doubt, request a technical review. 14 | 15 | # What to Review 16 | 17 | See the following sections for reviewer expectations for each type of pull request (PR) review: 18 | 19 | ## Copy Review 20 | 21 | A typical copy review consists of the following checks: 22 | 23 | - Wording, including grammar and spelling 24 | - Page structure 25 | - Technical content to the extent of the reviewer's understanding 26 | - Whether the PR fulfills the Acceptance Criteria described in the 27 | linked JIRA ticket 28 | 29 | ### What Not to Review 30 | 31 | Nothing is entirely off-limits to a copy review of a PR -- if you notice a technical issue, it's best to call it out early. 32 | Copy reviewers should constrain their reviews to content within the scope of the JIRA ticket or otherwise create PRs to address anything unrelated. 33 | 34 | ## Technical Review 35 | 36 | A typical technical review consists of the following checks: 37 | 38 | - Technical accuracy 39 | - Release notes, breaking changes, and upgrading pages; ensure the technical claims are correct. 40 | - Code snippets: ensure the code is idiomatic and that all technical claims are correct. e.g. ("To create a `Foo`, use the `Bar.createFoo()` method") 41 | - Problematic explanations that could trip up users who try to follow the documentation. 42 | 43 | ### What Not to Review 44 | 45 | While we welcome any recommendations on wording and structure, avoid blocking approval based on any copy edits. Please entrust the author to make the writing decisions based on style guidelines and team-specific writing conventions and to create PRs to address anything they deem outside the technical review scope. 46 | 47 | - Wording of sentences, although corrections to technical claims are welcome 48 | - Structure of the page 49 | - Any unchanged lines outside the PR unless relevant to the ticket acceptance criteria. 50 | 51 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | # ensures that we always use the latest version of the script 2 | if [ -f build-site.sh ]; then 3 | rm build-site.sh 4 | fi 5 | 6 | curl https://raw.githubusercontent.com/mongodb/docs-worker-pool/netlify-poc/scripts/build-site.sh -o build-site.sh 7 | sh build-site.sh 8 | -------------------------------------------------------------------------------- /config/redirects: -------------------------------------------------------------------------------- 1 | define: base https://www.mongodb.com/docs/drivers 2 | define: kafka https://www.mongodb.com/docs/kafka-connector/current 3 | define: manual https://www.mongodb.com/docs/manual 4 | define: atlas https://www.mongodb.com/docs/atlas 5 | define: devhub https://www.mongodb.com/developer 6 | define: languages-base https://www.mongodb.com/docs/languages 7 | define: cpp-driver-base ${languages-base}/cpp/cpp-driver/current 8 | define: c-driver-base ${languages-base}/c/c-driver/current/ 9 | define: pymongo-base ${languages-base}/python/pymongo-driver/current 10 | 11 | # Go 12 | 13 | raw: docs/drivers/go -> https://www.mongodb.com/docs/drivers/go/current/ 14 | 15 | # Java 16 | 17 | raw: docs/drivers/java -> ${base}/java-drivers/ 18 | raw: docs/drivers/reactive-streams/ -> https://www.mongodb.com/docs/languages/java/reactive-streams-driver/current/ 19 | 20 | # Kotlin 21 | 22 | raw: docs/drivers/kotlin-sync/ -> https://www.mongodb.com/docs/languages/kotlin/kotlin-sync-driver/current/ 23 | 24 | # Scala 25 | 26 | raw: docs/drivers/scala/ -> https://www.mongodb.com/docs/languages/scala/scala-driver/current/ 27 | 28 | # Rust 29 | 30 | raw: docs/drivers/rust -> https://www.mongodb.com/docs/drivers/rust/current/ 31 | 32 | # Manual FLE merge - update URLs after 6.0 release 33 | 34 | raw: docs/drivers/security -> ${manual}/core/csfle/ 35 | raw: docs/drivers/security/client-side-field-level-encryption-guide -> ${manual}/core/csfle/ 36 | raw: docs/drivers/security/client-side-field-level-encryption-local-key-to-kms -> ${manual}/core/csfle/tutorials/ 37 | raw: docs/drivers/use-cases/client-side-field-level-encryption-guide -> ${manual}/core/csfle/ 38 | raw: docs/drivers/use-cases/client-side-field-level-encryption-local-key-to-kms -> ${manual}/core/csfle/tutorials/ 39 | raw: docs/drivers/use-cases/sensitive-data-encryption -> ${manual}/core/csfle/ 40 | 41 | # C 42 | 43 | raw: docs/drivers/c -> ${c-driver-base} 44 | raw: docs/languages/c/c-driver -> ${c-driver-base} 45 | 46 | ### 47 | 48 | ### Redirects for Legacy Drivers Content 49 | 50 | ### 51 | 52 | raw: docs/drivers/tutorials -> ${base}/ 53 | raw: docs/drivers/perl -> ${base}/ 54 | raw: docs/drivers/perl-internals -> ${base}/ 55 | raw: docs/drivers/downloads -> ${base}/ 56 | raw: docs/drivers/syntax-table -> ${base}/ 57 | 58 | # cpp 59 | 60 | raw: docs/drivers/tutorial/download-and-compile-cpp-driver -> ${cpp-driver-base}/installation/ 61 | raw: docs/drivers/tutorial/getting-started-with-cpp-driver -> ${cpp-driver-base}/tutorial/ 62 | raw: docs/drivers/cpp-bson-array-examples -> ${cpp-driver-base}/working-with-bson/ 63 | raw: docs/drivers/cpp-bson-helper-functions -> ${cpp-driver-base}/working-with-bson/ 64 | raw: docs/drivers/cpp-to-sql-to-mongo-shell -> ${cpp-driver-base} 65 | raw: docs/drivers/tutorial/download-and-compile-cpp-driver-legacy -> https://mongocxx.org/legacy-v1/ 66 | raw: docs/drivers/tutorial/authenticate-with-cpp-driver -> ${cpp-driver-base}/configuration/#configuring-authentication 67 | raw: docs/drivers/cxx -> ${cpp-driver-base} 68 | raw: docs/drivers/cpp -> ${cpp-driver-base} 69 | raw: docs/drivers/cxx/index -> ${cpp-driver-base} 70 | raw: /docs/languages/cxx -> ${cpp-driver-base} 71 | 72 | # csharp 73 | 74 | raw: docs/drivers/tutorial/authenticate-with-csharp-driver -> ${base}/csharp/current/ 75 | raw: docs/drivers/csharp-community-projects -> ${base}/csharp/current/ 76 | raw: docs/drivers/tutorial/authenticate-with-csharp-driver -> ${base}/csharp/current/fundamentals/authentication 77 | raw: docs/drivers/tutorial/getting-started-with-csharp-driver -> ${base}/csharp/current/ 78 | raw: docs/drivers/tutorial/serialize-documents-with-the-csharp-driver -> ${base}/csharp/current/ 79 | raw: docs/drivers/tutorial/use-csharp-driver -> ${base}/csharp/current/ 80 | raw: docs/drivers/tutorial/use-linq-queries-with-csharp-driver -> ${base}/csharp/current/fundamentals/linq/ 81 | raw: docs/drivers/csharp -> ${base}/csharp/current/ 82 | 83 | # java 84 | 85 | raw: docs/drivers/java-concurrency -> http://mongodb.github.io/mongo-java-driver/3.0/driver/reference/crud 86 | raw: docs/drivers/java-replica-set-semantics -> http://mongodb.github.io/mongo-java-driver/3.0/driver/reference/crud 87 | raw: docs/drivers/java-types -> http://mongodb.github.io/mongo-java-driver/3.0/bson 88 | raw: docs/drivers/tutorial/getting-started-with-3.0-java-driver -> http://mongodb.github.io/mongo-java-driver/3.0/driver/getting-started/quick-tour 89 | raw: docs/drivers/tutorial/getting-started-with-java-driver -> http://mongodb.github.io/mongo-java-driver/2.13/getting-started/quick-tour 90 | raw: docs/drivers/tutorial/use-aggregation-framework-with-java-driver -> http://mongodb.github.io/mongo-java-driver/3.0/driver/getting-started/quick-tour 91 | raw: docs/drivers/tutorial/use-java-dbobject-to-perform-saves -> ${base}/java-drivers/ 92 | raw: docs/drivers/tutorial/authenticate-with-java-driver/ -> http://mongodb.github.io/mongo-java-driver/3.0/driver/reference/connecting/authenticating 93 | 94 | # nodejs 95 | 96 | raw: docs/drivers/javascript -> ${base}/node/current/ 97 | 98 | # ruby and mongoid 99 | 100 | raw: docs/drivers/tutorial/getting-started-with-ruby-on-rails-3 -> https://www.mongodb.com/docs/ruby-driver/current/tutorials/bson-v4/ 101 | raw: docs/drivers/tutorial/getting-started-with-ruby-on-rails ->https://www.mongodb.com/docs/ruby-driver/current/tutorials/bson-v4/ 102 | raw: docs/drivers/tutorial/model-data-for-ruby-on-rails -> ${base}/ruby/ 103 | raw: docs/drivers/ruby -> https://www.mongodb.com/docs/ruby-driver/current/ 104 | raw: docs/drivers/ruby-resources -> https://www.mongodb.com/docs/ruby-driver/current/reference/additional-resources/ 105 | raw: docs/drivers/tutorial/ruby-driver-tutorial -> https://www.mongodb.com/docs/ruby-driver/v2.2/ 106 | raw: docs/drivers/tutorial/ruby-driver-tutorial-2-0 -> https://www.mongodb.com/docs/ruby-driver/v2.0/ 107 | raw: docs/drivers/tutorial/ruby-bson-tutorial -> https://www.mongodb.com/docs/ruby-driver/current/tutorials/bson-v4/ 108 | raw: docs/drivers/tutorial/ruby-bson-tutorial-4-0 -> https://www.mongodb.com/docs/ruby-driver/current/tutorials/bson-v4/ 109 | raw: docs/drivers/tutorial/ruby-mongoid-tutorial -> https://www.mongodb.com/docs/mongoid/current// 110 | raw: docs/drivers/tutorial/mongoid-callbacks -> https://www.mongodb.com/docs/mongoid/current/tutorials/mongoid-callbacks// 111 | raw: docs/drivers/tutorial/mongoid-documents -> https://www.mongodb.com/docs/mongoid/current/tutorials/mongoid-documents/ 112 | raw: docs/drivers/tutorial/mongoid-indexes -> https://www.mongodb.com/docs/mongoid/current/tutorials/mongoid-indexes/ 113 | raw: docs/drivers/tutorial/mongoid-installation -> https://www.mongodb.com/docs/mongoid/current/tutorials/mongoid-installation/ 114 | raw: docs/drivers/tutorial/mongoid-nested-attributes -> https://www.mongodb.com/docs/mongoid/current/tutorials/mongoid-nested-attributes/ 115 | raw: docs/drivers/tutorial/mongoid-persistence -> https://www.mongodb.com/docs/mongoid/current/tutorials/mongoid-persistence/ 116 | raw: docs/drivers/tutorial/mongoid-queries -> https://www.mongodb.com/docs/mongoid/current/tutorials/mongoid-queries/ 117 | raw: docs/drivers/tutorial/mongoid-rails -> https://www.mongodb.com/docs/mongoid/current/tutorials/mongoid-rails/ 118 | raw: docs/drivers/tutorial/mongoid-relations -> https://www.mongodb.com/docs/mongoid/current/tutorials/mongoid-relations/ 119 | raw: docs/drivers/tutorial/mongoid-upgrade -> https://www.mongodb.com/docs/mongoid/current/tutorials/mongoid-upgrade/ 120 | raw: docs/drivers/tutorial/mongoid-validation -> https://www.mongodb.com/docs/mongoid/current/tutorials/mongoid-validation/ 121 | 122 | ### 123 | 124 | ### Redirects for Legacy Ecosystem Content 125 | 126 | ### 127 | 128 | # Amazon ec2 -> Atlas 129 | 130 | raw: docs/drivers/platforms/amazon-ec2 -> ${atlas}/ 131 | raw: docs/drivers/tutorial/install-mongodb-on-amazon-ec2 -> ${atlas}/ 132 | raw: docs/drivers/tutorial/automate-deployment-with-cloudformation -> ${atlas}/ 133 | raw: docs/drivers/tutorial/deploy-mongodb-from-aws-marketplace -> ${atlas}/ 134 | raw: docs/drivers/tutorial/backup-and-restore-mongodb-on-amazon-ec2 -> ${atlas}/backup-restore-cluster/ 135 | 136 | # Azure -> Atlas / Manual 137 | 138 | raw: docs/drivers/platforms/windows-azure -> ${atlas}/reference/microsoft-azure/ 139 | raw: docs/drivers/platforms/windows -> ${manual}/tutorial/install-mongodb-enterprise-on-windows/ 140 | raw: docs/drivers/tutorial/install-mongodb-on-windows-azure -> ${atlas}/reference/microsoft-azure/ 141 | raw: docs/drivers/tutorial/configure-worker-roles-in-azure -> ${atlas}/reference/microsoft-azure/ 142 | raw: docs/drivers/tutorial/deploy-mongodb-worker-roles-in-azure-version-1-6 -> ${atlas}/reference/microsoft-azure/ 143 | raw: docs/drivers/tutorial/deploy-mongodb-worker-roles-in-azure -> ${atlas}/reference/microsoft-azure/ 144 | raw: docs/drivers/tutorial/build-an-application-to-connect-to-mongodb-on-azure -> ${atlas}/reference/microsoft-azure/ 145 | raw: docs/drivers/tutorial/install-mongodb-on-linux-in-azure -> ${base}/platforms/windows-azure/ 146 | 147 | # Hadoop 148 | 149 | raw: docs/drivers/tools/hadoop -> https://github.com/mongodb/mongo-hadoop 150 | raw: docs/drivers/use-cases/hadoop -> https://github.com/mongodb/mongo-hadoop 151 | raw: docs/drivers/tutorial/getting-started-with-hadoop -> https://github.com/mongodb/mongo-hadoop/ 152 | 153 | # Kafka -> Kafka Connector site 154 | 155 | raw: docs/drivers/connectors/kafka -> ${kafka}/ 156 | raw: docs/drivers/connectors/kafka-connect-migration -> ${kafka}/kafka-connect-migration/ 157 | raw: docs/drivers/connectors/kafka-docker-example -> ${kafka}/kafka-docker-example/ 158 | raw: docs/drivers/connectors/kafka-installation -> ${kafka}/kafka-installation/ 159 | raw: docs/drivers/connectors/kafka-sink-cdc -> ${kafka}/kafka-sink-cdc/ 160 | raw: docs/drivers/connectors/kafka-sink-data-formats -> ${kafka}/kafka-sink-data-formats/ 161 | raw: docs/drivers/connectors/kafka-sink-postprocessors -> ${kafka}/kafka-sink-postprocessors/ 162 | raw: docs/drivers/connectors/kafka-sink-properties -> ${kafka}/kafka-sink-properties/ 163 | raw: docs/drivers/connectors/kafka-sink -> ${kafka}/kafka-sink/ 164 | raw: docs/drivers/connectors/kafka-source -> ${kafka}/kafka-source/ 165 | 166 | # Platforms 167 | 168 | raw: docs/drivers/platforms/digitalocean -> ${atlas}/ 169 | raw: docs/drivers/platforms/modulus -> ${atlas}/ 170 | raw: docs/drivers/platforms/rackspace-cloud -> ${atlas}/ 171 | raw: docs/drivers/platforms/red-hat-openshift -> https://www.mongodb.com/docs/kubernetes-operator/stable/ 172 | raw: docs/drivers/platforms/dotcloud -> ${atlas}/ 173 | raw: docs/drivers/platforms/vmware-cloud-foundry -> https://pivotal.io/platform/services-marketplace/data-management/mongodb 174 | 175 | # RHEL -> Manual 176 | 177 | raw: docs/drivers/platforms/red-hat-enterprise-linux -> ${manual}/tutorial/install-mongodb-enterprise-on-red-hat/ 178 | raw: docs/drivers/tutorial/configure-red-hat-enterprise-linux-identity-management -> ${manual}/tutorial/install-mongodb-enterprise-on-red-hat/ 179 | raw: docs/drivers/tutorial/manage-red-hat-enterprise-linux-identity-management -> ${manual}/tutorial/install-mongodb-enterprise-on-red-hat/ 180 | 181 | # Tools 182 | 183 | raw: docs/drivers/tools/munin -> https://github.com/comerford/mongo-munin 184 | raw: docs/drivers/tools/administration-interfaces -> https://www.mongodb.com/view-analyze/ 185 | raw: docs/drivers/tools/wireshark -> https://wiki.wireshark.org/Mongo 186 | raw: docs/drivers/tools/applications -> https://www.mongodb.com/community 187 | 188 | # Use Cases -> Devhub 189 | 190 | raw: docs/drivers/use-cases/category-hierarchy -> ${devhub}/ 191 | raw: docs/drivers/use-cases/hierarchical-aggregation -> ${devhub}/ 192 | raw: docs/drivers/use-cases/http-interfaces -> ${devhub}/ 193 | raw: docs/drivers/tools/http-interfaces -> ${devhub}/ 194 | raw: docs/drivers/use-cases/inventory-management -> ${devhub}/ 195 | raw: docs/drivers/use-cases/metadata-and-asset-management -> ${devhub}/ 196 | raw: docs/drivers/use-cases/product-catalog -> ${devhub}/ 197 | raw: docs/drivers/use-cases/storing-comments -> ${devhub}/ 198 | raw: docs/drivers/use-cases/storing-log-data -> ${devhub}/ 199 | raw: docs/drivers/use-cases/pre-aggregated-reports-mmapv1 -> ${manual}/changeStreams/ 200 | raw: docs/drivers/use-cases/pre-aggregated-reports -> ${manual}/changeStreams/ 201 | raw: docs/drivers/tutorial/write-a-tumblelog-application-with-flask-mongoengine -> https://pymodm.readthedocs.io/en/latest/getting-started.html 202 | 203 | # Redirects for ecosystem that were previously handled in Fastly 204 | 205 | raw: docs/ecosystem/use-cases/pre-aggregated-reports/ -> ${devhub}/ 206 | raw: docs/ecosystem/tutorial/authenticate-with-java-driver/ -> ${devhub}/ 207 | raw: docs/ecosystem/use-cases/client-side-field-level-encryption-guide/ -> https://www.mongodb.com/docs/manual/core/csfle/ 208 | raw: docs/ecosystem/tools/http-interfaces/ -> ${devhub}/ 209 | raw: docs/ecosystem/tools/http-interface/ -> ${devhub}/ 210 | raw: docs/ecosystem/security/client-side-field-level-encryption-guide -> https://www.mongodb.com/docs/manual/core/csfle/ 211 | raw: docs/ecosystem/driver/ -> ${base}/ 212 | raw: docs/ecosystem/drivers/ -> ${base}/ 213 | raw: docs/ecosystem/drivers/node-js/ -> ${base}/node/current/ 214 | raw: docs/ecosystem/drivers/scala/ -> ${base}/scala/ 215 | raw: docs/ecosystem/drivers/ruby/ -> https://www.mongodb.com/docs/ruby-driver/current/ 216 | raw: docs/ecosystem/drivers/python/ -> ${base}/python/ 217 | raw: docs/ecosystem/drivers/pymongo/ -> ${base}/pymongo/ 218 | raw: docs/ecosystem/drivers/perl/ -> ${base}/ 219 | raw: docs/ecosystem/drivers/php/ -> ${base}/php/ 220 | raw: docs/ecosystem/drivers/node/ -> ${base}/node/current/ 221 | raw: docs/ecosystem/drivers/csharp/ -> ${base}/csharp/current/ 222 | raw: docs/ecosystem/drivers/java/ -> ${base}/java-drivers/ 223 | raw: docs/ecosystem/drivers/c/ -> ${base}/c/ 224 | raw: docs/ecosystem/drivers/driver-compatibility-reference/ -> ${base}/about-compatibility/ 225 | raw: docs/ecosystem/ -> ${base}/ 226 | 227 | # Redirects for drivers/drivers/ 228 | 229 | raw: docs/drivers/drivers/ -> ${base}/ 230 | raw: docs/drivers/drivers/c/ -> ${base}/c/ 231 | raw: docs/drivers/drivers/cxx/ -> ${cpp-driver-base} 232 | raw: docs/drivers/drivers/cpp/ -> ${cpp-driver-base} 233 | raw: docs/drivers/drivers/csharp/ -> ${base}/csharp/current/ 234 | raw: docs/drivers/drivers/go/ -> ${base}/go/current/ 235 | raw: docs/drivers/drivers/java/ -> ${base}/java-drivers/ 236 | raw: docs/drivers/drivers/kotlin/ -> ${base}/kotlin-drivers/ 237 | raw: docs/drivers/drivers/node/ -> ${base}/node/current/ 238 | raw: docs/drivers/drivers/php/ -> ${base}/php-drivers/ 239 | raw: docs/drivers/drivers/python/ -> ${base}/python-drivers/ 240 | raw: docs/drivers/drivers/pymongo/ -> ${base}/pymongo/ 241 | raw: docs/drivers/drivers/ruby/ -> ${base}/ruby-drivers/ 242 | raw: docs/drivers/drivers/rust/ -> ${base}/rust/current/ 243 | raw: docs/drivers/drivers/scala/ -> ${base}/scala/ 244 | raw: docs/drivers/drivers/swift/ -> ${base}/swift/ 245 | 246 | raw: docs/drivers/drivers/driver-compatibility-reference -> ${base}/ 247 | raw: docs/drivers/driver-compatibility-reference/ -> ${base}/about-compatibility/ 248 | 249 | # Redirect for outdated Community Drivers page 250 | 251 | raw: docs/drivers/community-supported-drivers/ -> ${base}/ 252 | 253 | # Redirects for consistent language-spcific driver landing pages 254 | 255 | raw: docs/drivers/php/ -> ${base}/php-drivers/ 256 | raw: docs/drivers/python/ -> ${base}/python-drivers/ 257 | raw: docs/drivers/ruby/ -> ${base}/ruby-drivers/ 258 | raw: docs/drivers/kotlin/ -> ${base}/kotlin-drivers/ 259 | 260 | # Docs consolidation redirects 261 | 262 | raw: docs/drivers/pymongo/ -> ${pymongo-base} 263 | -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | [[integrations]] 2 | name = "snooty-cache-plugin" 3 | 4 | [build] 5 | publish = "snooty/public" 6 | command = ". ./build.sh" 7 | -------------------------------------------------------------------------------- /snooty.toml: -------------------------------------------------------------------------------- 1 | name = "drivers" 2 | title = "Drivers" 3 | 4 | toc_landing_pages = [ 5 | "/python-drivers", 6 | "/php-drivers", 7 | "/java-drivers", 8 | "/kotlin-drivers", 9 | "/ruby-drivers", 10 | "/csharp-drivers", 11 | "/other-document-dbs", 12 | ] 13 | 14 | intersphinx = ["https://www.mongodb.com/docs/manual/objects.inv"] 15 | sharedinclude_root = "https://raw.githubusercontent.com/10gen/docs-shared/main/" 16 | 17 | [constants] 18 | package-name-org = "docs-ecosystem" 19 | stable-api = "Stable API" 20 | node-driver-long = "MongoDB Node.js Driver" 21 | node-driver-short = "Node.js Driver" 22 | atlas = "MongoDB Atlas" 23 | 24 | [[banners]] 25 | targets = ["motor.txt"] 26 | variant = "warning" 27 | value = """ 28 | As of May 14th, 2025, Motor has been sunset in favor of the GA release of the PyMongo Async API in Pymongo. \ 29 | No new features will be added to Motor. Motor will be deprecated on May 14th, 2026, \ 30 | and no further bug fixes will be released after deprecation, with the exception of critical bug fixes, which will be released until May 14th, 2027. \ 31 | We strongly recommend that Motor users migrate to PyMongo Async while Motor is still supported. \ 32 | To learn how to migrate from Motor to the PyMongo Async API, see the \ 33 | `Migrate to PyMongo Async guide `__. 34 | """ 35 | -------------------------------------------------------------------------------- /source/about-compatibility.txt: -------------------------------------------------------------------------------- 1 | .. _about-driver-compatibility: 2 | 3 | ============================ 4 | MongoDB Compatibility Tables 5 | ============================ 6 | 7 | .. meta:: 8 | :description: Explore compatibility tables for MongoDB drivers, detailing server, language, and component compatibility to ensure operational environments. 9 | 10 | .. facet:: 11 | :name: genre 12 | :values: reference 13 | 14 | We include compatibility tables for each version of the driver to guide 15 | your decisions on what versions you need to ensure your environment 16 | remains fully operational. 17 | 18 | We maintain the following tables for each driver: 19 | 20 | - :ref:`MongoDB compatibility ` 21 | - :ref:`Language compatibility ` 22 | 23 | .. important:: Locating Compatibility Tables 24 | 25 | Each :driver:`driver's documentation ` contains compatibility 26 | tables for that specific driver. After navigating to a driver 27 | documentation site, select the :guilabel:`Compatibility` entry from 28 | the left-hand navigation to view the MongoDB and language 29 | compatibility details for that driver. 30 | 31 | Read the following sections for explanations of these tables. 32 | 33 | .. _mongodb-compatibility-tables: 34 | 35 | MongoDB Compatibility Tables 36 | ---------------------------- 37 | 38 | In the **MongoDB Compatibility** tables, the columns are labeled with 39 | versions of MongoDB server and the rows are labeled with major release 40 | versions of the driver. 41 | 42 | The check marks (✓) indicate that the driver can access **all the 43 | features** of that specific version of MongoDB server unless those features 44 | have been deprecated or removed. 45 | 46 | The circled asterisks (⊛) indicate that the driver version works with 47 | that specific version of MongoDB server, but may not be able to access all 48 | the features. 49 | 50 | If you are **upgrading your server version**, check whether your current driver 51 | version is compatible. We recommend using the newest compatible driver when 52 | upgrading your server version. 53 | 54 | If you are **upgrading your driver version**, you can use the table to 55 | identify which version you need to access all the newest features included 56 | in a specific version of the server. Also note that any of the minor 57 | or patch versions share the same compatibility as the major version 58 | release. 59 | 60 | We recommend that you avoid using older versions of the drivers that do not 61 | appear on the chart because they are unsupported. 62 | 63 | .. sharedinclude:: dbx/lifecycle-schedule-callout.rst 64 | 65 | .. _language-compatibility-tables: 66 | 67 | Language Compatibility Tables 68 | ----------------------------- 69 | 70 | In the **Language Compatibility** tables, the columns are labeled with 71 | versions of the language (e.g. Node.js, Python, etc.) and the rows are 72 | labeled with major release versions of the driver. 73 | 74 | The check marks (✓) indicate that the code in the driver is fully 75 | compatible with the version of the language. 76 | 77 | Component Compatibility Tables 78 | ------------------------------ 79 | 80 | In the **Component Compatibility** tables, the columns indicate versions of 81 | the driver, and the rows indicate the component package names. 82 | 83 | The table cells indicate which versions of the component packages are 84 | compatible with the driver version specified in that column. 85 | 86 | If the table cell value is blank, the component package is incompatible with 87 | the version of the driver version specified in that column. 88 | 89 | -------------------------------------------------------------------------------- /source/cosmosdb-support.txt: -------------------------------------------------------------------------------- 1 | .. _cosmosdb-compat: 2 | 3 | :noprevnext: 4 | 5 | ============================= 6 | Azure Cosmos DB Compatibility 7 | ============================= 8 | 9 | .. facet:: 10 | :name: genre 11 | :values: reference 12 | 13 | .. meta:: 14 | :keywords: microsoft, support 15 | :description: Explore how Azure Cosmos DB for MongoDB allows using MongoDB drivers and tools, with limitations in compatibility and feature support. 16 | 17 | .. contents:: On this page 18 | :local: 19 | :backlinks: none 20 | :depth: 1 21 | 22 | .. figure:: /figures/cosmosdb.png 23 | :alt: Azure Cosmos DB logo 24 | 25 | `Azure Cosmos DB for MongoDB `__ 26 | makes it easy to use Azure Cosmos DB as if it were a MongoDB database. 27 | With Azure Cosmos DB, you can run the same application code and use the same drivers 28 | and tools that you use with MongoDB. 29 | 30 | Azure Cosmos DB for MongoDB implements MongoDB's 31 | `Wire Protocol `__ 32 | to allow MongoDB `drivers `__ to connect and 33 | interact with Cosmos DB as though it were a MongoDB host. However, this 34 | implementation has limitations, as outlined in the :ref:`cosmosdb-compat-section` section 35 | of this page. 36 | 37 | Version Information 38 | ------------------- 39 | 40 | Azure Cosmos DB supports MongoDB v4.2, or MongoDB v5.0 for vCore clusters. 41 | These versions don't support all the newer features and functionality in the versions of 42 | MongoDB available on `MongoDB Atlas. `__ 43 | 44 | .. tip:: MongoDB Version History 45 | 46 | To learn more about the features available in each version of MongoDB, see 47 | `MongoDB Evolved - Version History. `__ 48 | 49 | .. _cosmosdb-compat-section: 50 | 51 | Compatibility 52 | ------------- 53 | 54 | As of October 2023, Azure Cosmos DB is about 32 percent compatible with the 55 | MongoDB API. 56 | 57 | On Azure Cosmos DB for MongoDB v4.2, the following MongoDB v4.2 features are 58 | available in a limited capacity or are not supported at all: 59 | 60 | - **Features**: `Text indexes `__, 61 | `2d indexes `__, 62 | `hashed indexes `__, 63 | `case-insensitive indexes `__, 64 | `sparse indexes `__ 65 | - **Aggregation Stages**: ``$collStats``, ``$bucket``, ``$bucketAuto``, ``$currentOp``, 66 | ``$indexStats``, ``$listLocalSessions``, ``$listSessions``, ``$lookup`` 67 | 68 | To learn more about Azure Cosmos DB's compatibility with MongoDB v4.2, 69 | see Microsoft's `Azure Cosmos DB for MongoDB (4.2 server version): Supported features and syntax `__ 70 | documentation. 71 | 72 | For the most current compatibility status between Azure Cosmos DB and MongoDB, see the 73 | `Is Cosmos DB Compatible with MongoDB Atlas? `__ 74 | website. 75 | 76 | Support 77 | ------- 78 | 79 | MongoDB doesn't offer commercial support for Azure Cosmos DB. For help with this product, 80 | contact `Azure Support. `__ 81 | -------------------------------------------------------------------------------- /source/csharp-drivers.txt: -------------------------------------------------------------------------------- 1 | .. _csharp-language-center: 2 | 3 | ====================== 4 | MongoDB .NET/C# Driver 5 | ====================== 6 | 7 | .. facet:: 8 | :name: programming_language 9 | :values: csharp 10 | 11 | .. facet:: 12 | :name: genre 13 | :values: reference 14 | 15 | .. meta:: 16 | :description: Use the .NET/C# driver to connect your application to MongoDB Atlas, Enterprise, and Community database deployments. 17 | :keywords: application 18 | 19 | .. toctree:: 20 | :titlesonly: 21 | 22 | .NET/C# Driver 23 | Entity Framework Provider 24 | 25 | .. contents:: On this page 26 | :local: 27 | :backlinks: none 28 | :depth: 1 29 | 30 | Introduction 31 | ------------ 32 | 33 | Welcome to the documentation site for the official MongoDB .NET/C# 34 | driver and Entity Framework provider. 35 | 36 | .NET/C# Driver 37 | -------------- 38 | 39 | You can add the driver to your application to work with MongoDB in .NET or C#. See 40 | the `.NET/C# driver documentation `__ 41 | to learn how to install and begin using the driver. 42 | 43 | Entity Framework Provider 44 | ------------------------- 45 | 46 | You can add the MongoDB Entity Framework provider to your .NET application as an 47 | object-relational mapper (ORM) to work with data in MongoDB. See the 48 | `Entity Framework provider documentation `__ 49 | to learn how to begin using the provider. 50 | -------------------------------------------------------------------------------- /source/documentdb-support.txt: -------------------------------------------------------------------------------- 1 | .. _documentdb-compat: 2 | 3 | :noprevnext: 4 | 5 | =============================== 6 | Amazon DocumentDB Compatibility 7 | =============================== 8 | 9 | .. facet:: 10 | :name: genre 11 | :values: reference 12 | 13 | .. meta:: 14 | :keywords: AWS, support 15 | :description: Explore the limited compatibility of Amazon DocumentDB with MongoDB features, commands, query operators, and aggregation stages. 16 | 17 | .. contents:: On this page 18 | :local: 19 | :backlinks: none 20 | :depth: 1 21 | 22 | Version Information 23 | ------------------- 24 | 25 | Amazon DocumentDB claims support for MongoDB v4.0 and MongoDB v5.0. These 26 | versions do not support all the newer features and functionality in the versions 27 | of MongoDB available on :atlas:`MongoDB Atlas `. 28 | 29 | .. tip:: MongoDB Version History 30 | 31 | To learn more about the features available in each version of MongoDB, see 32 | `MongoDB Evolved - Version History. `__ 33 | 34 | Compatibility 35 | ------------- 36 | 37 | On Amazon DocumentDB, the following MongoDB features are 38 | available in a limited capacity or are not supported at all: 39 | 40 | - **Features**: :manual:`Capped collections `, 41 | :manual:`map-reduce operations `, 42 | :manual:`GridFS `, 43 | :manual:`text indexes `, 44 | :atlas:`vector search indexes `, 45 | :manual:`partial indexes `, 46 | :manual:`case-insensitive indexes `, 47 | :manual:`time-series data `, 48 | :manual:`on-demand materialized views `, 49 | :manual:`client-side field level encryption `, 50 | :manual:`queryable encryption ` 51 | - **Commands**: ``collMod``, ``collMod:expireAfterSeconds``, ``copydb``, 52 | ``createView``, ``filemd5``, ``reIndex``, ``connPoolStats``, ``dbHash``, 53 | ``features``, ``getLastError``, ``getPrevError``, ``parallelCollectionScan``, 54 | ``resetError``, ``endSessions``, ``killAllSessionsByPattern``, 55 | ``refreshSessions``, sharding commands (aside from ``enableSharding`` and 56 | ``shardCollection``) 57 | - **Query Operators**: ``$expr``, ``$jsonSchema``, ``$text``, ``$where``, 58 | ``$meta``, ``$box``, ``$center``, ``$centerSphere``, ``$polygon``, ``$near``, 59 | ``$uniqueDocs`` 60 | - **Aggregation Operators**: ``$accumulator``, ``$count``, ``$stdDevPop``, 61 | ``$stdDevSamp``, ``$pow``, ``$trunc``, ``$round``, ``$first``, ``$last``, 62 | ``$switch``, ``$binarySize``, ``$bsonSize``, ``$dateFromParts``, 63 | ``$dateToParts``, ``$dateTrunc``, ``$dateDiff``, ``$ltrim``, ``$rtrim``, 64 | ``$trim``, ``$regexFind``, ``$regexFindAll``, ``$regexMatch``, 65 | ``$replaceOne``, ``$replaceAll``, ``$isNumber``, ``$rand``, ``$sampleRate``, 66 | ``$getField`` 67 | - **Aggregation Stages**: ``$collStats``, ``$facet``, ``$bucket``, 68 | ``$bucketAuto``, ``$sortByCount``, ``$unionWith``, ``$set``, 69 | ``$setWindowFields``, ``$unset``, ``$listLocalSessions``, ``$listSessions``, 70 | ``$graphLookup``, ``$merge``, ``$planCacheStats`` 71 | - **Cursor Methods**: ``cursor.collation()``, ``cursor.max()``, 72 | ``cursor.min()``, ``cursor.noCursorTimeout()``, ``cursor.returnKey()``, 73 | ``cursor.showRecordId()``, ``cursor.tailable()`` 74 | 75 | In addition, Amazon DocumentDB does not leverage indexes when performing queries 76 | that contain any of the following operators: 77 | 78 | - ``$ne`` 79 | - ``$nin`` 80 | - ``$nor`` 81 | - ``$not`` 82 | - ``$exists`` 83 | - ``$distinct`` 84 | - ``$elemMatch`` when used in nested queries 85 | 86 | To learn more about Amazon DocumentDB's compatibility with MongoDB v4.0 and MongoDB v5.0, 87 | see the following AWS documentation: 88 | 89 | - `MongoDB Compatibility `__ 90 | - `Functional Differences: Amazon DocumentDB and MongoDB `__ 91 | - `Supported MongoDB APIs, Operations, and Data Types `__ 92 | 93 | Support 94 | ------- 95 | 96 | MongoDB doesn't offer commercial support for Amazon DocumentDB. For help with this product, 97 | contact `AWS Support. `__ 98 | -------------------------------------------------------------------------------- /source/facets.toml: -------------------------------------------------------------------------------- 1 | [[facets]] 2 | category = "target_product" 3 | value = "drivers" 4 | -------------------------------------------------------------------------------- /source/figures/M220J_hero.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/docs-ecosystem/1d0a7b4828ea970109c6b5780b3a660ca544989b/source/figures/M220J_hero.jpg -------------------------------------------------------------------------------- /source/figures/M220P_hero.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/docs-ecosystem/1d0a7b4828ea970109c6b5780b3a660ca544989b/source/figures/M220P_hero.jpg -------------------------------------------------------------------------------- /source/figures/cosmosdb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/docs-ecosystem/1d0a7b4828ea970109c6b5780b3a660ca544989b/source/figures/cosmosdb.png -------------------------------------------------------------------------------- /source/figures/documentdb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/docs-ecosystem/1d0a7b4828ea970109c6b5780b3a660ca544989b/source/figures/documentdb.png -------------------------------------------------------------------------------- /source/icons/c++.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /source/icons/c.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /source/icons/csharp.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /source/icons/elixir.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /source/icons/go.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /source/icons/java.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /source/icons/kotlin.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /source/icons/mongoose.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | image/svg+xml 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /source/icons/node-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /source/icons/php.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /source/icons/prisma-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /source/icons/prisma.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /source/icons/python.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /source/icons/r.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /source/icons/ruby.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | -------------------------------------------------------------------------------- /source/icons/rust-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /source/icons/rust.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /source/icons/scala.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /source/icons/swift.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /source/icons/ts.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /source/includes/about-driver-compatibility.rst: -------------------------------------------------------------------------------- 1 | For more information on how to read the compatibility tables, see our guide on 2 | :doc:`MongoDB Compatibility Tables `. 3 | -------------------------------------------------------------------------------- /source/includes/atlas-connect-blurb.rst: -------------------------------------------------------------------------------- 1 | 2 | To connect to a :atlas:`MongoDB Atlas <>` cluster, use the 3 | :atlas:`Atlas connection string ` for your cluster: 4 | -------------------------------------------------------------------------------- /source/includes/connection-snippets/scram/py-motor-connection-no-stableapi.py: -------------------------------------------------------------------------------- 1 | import asyncio 2 | from motor.motor_asyncio import AsyncIOMotorClient 3 | 4 | async def ping_server(): 5 | # Replace the placeholder with your Atlas connection string 6 | uri = "" 7 | 8 | # Create a new client and connect to the server 9 | client = AsyncIOMotorClient(uri) 10 | 11 | # Send a ping to confirm a successful connection 12 | try: 13 | await client.admin.command('ping') 14 | print("Pinged your deployment. You successfully connected to MongoDB!") 15 | except Exception as e: 16 | print(e) 17 | 18 | asyncio.run(ping_server()) -------------------------------------------------------------------------------- /source/includes/connection-snippets/scram/py-motor-connection-tornado.py: -------------------------------------------------------------------------------- 1 | import tornado 2 | import motor 3 | 4 | async def ping_server(): 5 | # Replace the placeholder with your Atlas connection string 6 | uri = "" 7 | 8 | # Set a 5-second connection timeout when creating a new client 9 | client = motor.motor_tornado.MotorClient(uri, serverSelectionTimeoutMS=5000) 10 | 11 | # Send a ping to confirm a successful connection 12 | try: 13 | await client.admin.command('ping') 14 | print("Pinged your deployment. You successfully connected to MongoDB!") 15 | except Exception as e: 16 | print(e) 17 | 18 | tornado.ioloop.IOLoop.current().run_sync(ping_server) -------------------------------------------------------------------------------- /source/includes/connection-snippets/scram/py-motor-connection.py: -------------------------------------------------------------------------------- 1 | import asyncio 2 | from motor.motor_asyncio import AsyncIOMotorClient 3 | from pymongo.server_api import ServerApi 4 | 5 | async def ping_server(): 6 | # Replace the placeholder with your Atlas connection string 7 | uri = "" 8 | 9 | # Set the Stable API version when creating a new client 10 | client = AsyncIOMotorClient(uri, server_api=ServerApi('1')) 11 | 12 | # Send a ping to confirm a successful connection 13 | try: 14 | await client.admin.command('ping') 15 | print("Pinged your deployment. You successfully connected to MongoDB!") 16 | except Exception as e: 17 | print(e) 18 | 19 | asyncio.run(ping_server()) -------------------------------------------------------------------------------- /source/includes/fact-environments.rst: -------------------------------------------------------------------------------- 1 | - `MongoDB Atlas 2 | `__: The fully 3 | managed service for MongoDB deployments in the cloud 4 | - :ref:`MongoDB Enterprise `: The 5 | subscription-based, self-managed version of MongoDB 6 | - :ref:`MongoDB Community `: The 7 | source-available, free-to-use, and self-managed version of MongoDB 8 | -------------------------------------------------------------------------------- /source/includes/help-links-general.rst: -------------------------------------------------------------------------------- 1 | How to get help 2 | --------------- 3 | 4 | - Ask questions on our :community-forum:`MongoDB Community Forums <>`. 5 | - Visit our :technical-support:`Support Channels `. 6 | -------------------------------------------------------------------------------- /source/includes/help-links-motor.rst: -------------------------------------------------------------------------------- 1 | How to get help 2 | --------------- 3 | 4 | - Ask questions on our :community-forum:`MongoDB Community Forums <>`. 5 | - Visit our :technical-support:`Support Channels `. 6 | - See `JIRA `__ to raise issues or request features. 7 | -------------------------------------------------------------------------------- /source/includes/help-links-php.rst: -------------------------------------------------------------------------------- 1 | How to get help 2 | --------------- 3 | 4 | - Ask questions on our :community-forum:`MongoDB Community Forums <>`. 5 | - Visit our :technical-support:`Support Channels `. 6 | - File an issue or feature request in JIRA under one of the following: 7 | - `Extension `_ 8 | - `Library `_ 9 | -------------------------------------------------------------------------------- /source/includes/help-links-swift.rst: -------------------------------------------------------------------------------- 1 | How to get help 2 | --------------- 3 | 4 | - Ask questions on our :community-forum:`MongoDB Community Forums <>`. 5 | - Visit our :technical-support:`Support Channels `. 6 | - See our :issue:`SWIFT ` JIRA project to raise issues or request 7 | features. 8 | -------------------------------------------------------------------------------- /source/includes/language-compatibility-table-motor.rst: -------------------------------------------------------------------------------- 1 | 2 | .. list-table:: 3 | :header-rows: 1 4 | :stub-columns: 1 5 | :class: compatibility-large 6 | 7 | * - Motor Driver Version 8 | - Python 3.13 9 | - Python 3.12 10 | - Python 3.11 11 | - Python 3.10 12 | - Python 3.9 13 | - Python 3.8 14 | - Python 3.7 15 | 16 | * - 3.7 17 | - ✓ 18 | - ✓ 19 | - ✓ 20 | - ✓ 21 | - ✓ 22 | - 23 | - 24 | 25 | * - 3.6 26 | - ✓ 27 | - ✓ 28 | - ✓ 29 | - ✓ 30 | - ✓ 31 | - ✓ 32 | - 33 | 34 | * - 3.5 35 | - 36 | - ✓ 37 | - ✓ 38 | - ✓ 39 | - ✓ 40 | - ✓ 41 | - 42 | 43 | * - 3.3 to 3.4 44 | - 45 | - ✓ 46 | - ✓ 47 | - ✓ 48 | - ✓ 49 | - ✓ 50 | - ✓ 51 | 52 | * - 3.1 to 3.2 53 | - 54 | - 55 | - ✓ 56 | - ✓ 57 | - ✓ 58 | - ✓ 59 | - ✓ 60 | 61 | * - 3.0 62 | - 63 | - 64 | - 65 | - ✓ 66 | - ✓ 67 | - ✓ 68 | - ✓ 69 | 70 | - Motor 3.7 wraps PyMongo 4.10 71 | - Motor 3.6 wraps PyMongo 4.9 72 | - Motor 3.5 wraps PyMongo 4.5 to 4.8 73 | - Motor 3.3 and 3.4 wrap PyMongo 4.5 74 | - Motor 3.2 wraps PyMongo 4.4+ 75 | - Motor 3.1 wraps PyMongo 4.2+ 76 | - Motor 3.0 wraps PyMongo 4.1+ 77 | 78 | .. note:: 79 | 80 | - For asyncio support, Motor requires Python 3.4+, or 81 | Python 3.3 with the `asyncio package from PyPI 82 | `_. 83 | 84 | - Motor 2.3+ supports Windows. 85 | -------------------------------------------------------------------------------- /source/includes/language-compatibility-table-swift.rst: -------------------------------------------------------------------------------- 1 | The MongoDB Swift driver requires **Swift 5.1** or later. 2 | -------------------------------------------------------------------------------- /source/includes/localhost-connection.rst: -------------------------------------------------------------------------------- 1 | If you need to run a MongoDB server on your local machine for development 2 | purposes instead of using an Atlas cluster, you need to complete the following: 3 | 4 | 1. Download the `Community `__ 5 | or `Enterprise `__ version 6 | of MongoDB Server. 7 | 8 | #. `Install and configure `__ 9 | MongoDB Server. 10 | 11 | #. Start the server. 12 | 13 | .. important:: 14 | 15 | Always secure your MongoDB server from malicious attacks. See our 16 | :manual:`Security Checklist ` for a 17 | list of security recommendations. 18 | 19 | After you successfully start your MongoDB server, specify your connection 20 | string in your driver connection code. 21 | 22 | If your MongoDB Server is running locally, you can use the connection string 23 | ``"mongodb://localhost:"`` where ```` is the port number you 24 | configured your server to listen for incoming connections. 25 | 26 | If you need to specify a different hostname or IP address, see our Server 27 | Manual entry on :manual:`Connection Strings `. 28 | -------------------------------------------------------------------------------- /source/includes/mongodb-compatibility-table-motor.rst: -------------------------------------------------------------------------------- 1 | .. sharedinclude:: dbx/compatibility-table-legend.rst 2 | 3 | .. list-table:: 4 | :header-rows: 1 5 | :stub-columns: 1 6 | :class: compatibility 7 | 8 | * - Motor Driver Version 9 | - MongoDB 8.0 10 | - MongoDB 7.0 11 | - MongoDB 6.0 12 | - MongoDB 5.0 13 | - MongoDB 4.4 14 | - MongoDB 4.2 15 | - MongoDB 4.0 16 | - MongoDB 3.6 17 | 18 | * - 3.7 19 | - ✓ 20 | - ✓ 21 | - ✓ 22 | - ✓ 23 | - ✓ 24 | - ✓ 25 | - ✓ 26 | - 27 | * - 3.6 28 | - ✓ 29 | - ✓ 30 | - ✓ 31 | - ✓ 32 | - ✓ 33 | - ✓ 34 | - ✓ 35 | - ✓ 36 | * - 3.2 to 3.5 37 | - ⊛ 38 | - ✓ 39 | - ✓ 40 | - ✓ 41 | - ✓ 42 | - ✓ 43 | - ✓ 44 | - ✓ 45 | * - 3.1 46 | - ⊛ 47 | - ⊛ 48 | - ✓ 49 | - ✓ 50 | - ✓ 51 | - ✓ 52 | - ✓ 53 | - ✓ 54 | * - 3.0 55 | - ⊛ 56 | - ⊛ 57 | - ⊛ 58 | - ✓ 59 | - ✓ 60 | - ✓ 61 | - ✓ 62 | - ✓ 63 | -------------------------------------------------------------------------------- /source/includes/mongodb-compatibility-table-swift.rst: -------------------------------------------------------------------------------- 1 | .. sharedinclude:: dbx/compatibility-table-legend.rst 2 | 3 | .. list-table:: 4 | :header-rows: 1 5 | :stub-columns: 1 6 | :class: compatibility-large 7 | 8 | * - Swift Driver Version 9 | - MongoDB 7.0 10 | - MongoDB 6.0 11 | - MongoDB 5.0 12 | - MongoDB 4.4 13 | - MongoDB 4.2 14 | - MongoDB 4.0 15 | - MongoDB 3.6 16 | 17 | * - 1.3.0 [#1.2-1.3-limitations]_ 18 | - 19 | - ⊛ 20 | - ✓ 21 | - ✓ 22 | - ✓ 23 | - ✓ 24 | - ✓ 25 | 26 | * - 1.2.0 [#1.2-1.3-limitations]_ 27 | - 28 | - ⊛ 29 | - ✓ 30 | - ✓ 31 | - ✓ 32 | - ✓ 33 | - ✓ 34 | 35 | * - 1.1.0 [#1.0-1.1-limitations]_ 36 | - 37 | - ⊛ 38 | - ⊛ 39 | - ✓ 40 | - ✓ 41 | - ✓ 42 | - ✓ 43 | 44 | * - 1.0.0 [#1.0-1.1-limitations]_ 45 | - 46 | - ⊛ 47 | - ⊛ 48 | - ✓ 49 | - ✓ 50 | - ✓ 51 | - ✓ 52 | 53 | Because the Swift driver is not under active development, it has not 54 | been tested with MongoDB Server versions 7.0 or later. 55 | 56 | The Swift driver is not compatible with MongoDB server versions older than 3.6. 57 | 58 | .. [#1.2-1.3-limitations] Versions 1.2 and 1.3 do not include support for 59 | :ref:`Client-Side Field Level Encryption `, 60 | :manual:`GridFS `, and authentication using AWS IAM roles. 61 | 62 | .. [#1.0-1.1-limitations] Versions 1.0 and 1.1 do not include support for 63 | :manual:`OCSP `, 64 | :ref:`Client-Side Field Level Encryption `, 65 | :manual:`GridFS `, and authentication using AWS IAM roles. 66 | -------------------------------------------------------------------------------- /source/includes/older-server-versions-unsupported.rst: -------------------------------------------------------------------------------- 1 | The driver does not support older versions of MongoDB. -------------------------------------------------------------------------------- /source/includes/php-frameworks/symfony/Restaurant.php: -------------------------------------------------------------------------------- 1 | dm = $dm; 24 | $this->logger = $logger; 25 | } 26 | 27 | #[Route('/', name: 'restaurant_index', methods: ['GET'])] 28 | public function index(Request $request): Response 29 | { 30 | return $this->render('restaurant/index.html.twig'); 31 | } 32 | 33 | #[Route('/restaurant/browse', name: 'restaurant_browse', methods: ['GET'])] 34 | public function browse(Request $request): Response 35 | { 36 | $restaurantRepository = $this->dm->getRepository(Restaurant::class); 37 | $queryBuilder = $restaurantRepository->createQueryBuilder(); 38 | 39 | $restaurants = $queryBuilder 40 | ->field('borough')->equals('Queens') 41 | ->field('name')->equals(new Regex('Moon', 'i')) 42 | ->getQuery() 43 | ->execute(); 44 | 45 | return $this->render('restaurant/browse.html.twig', ['restaurants' => $restaurants]); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /source/includes/php-frameworks/symfony/app_render.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/docs-ecosystem/1d0a7b4828ea970109c6b5780b3a660ca544989b/source/includes/php-frameworks/symfony/app_render.png -------------------------------------------------------------------------------- /source/includes/php-frameworks/symfony/browse.html.twig: -------------------------------------------------------------------------------- 1 | {# templates/restaurant/browse.html.twig #} 2 | 3 | {% extends 'base.html.twig' %} 4 | 5 | {% block title %} 6 | Search Restaurants 7 | {% endblock %} 8 | 9 | {% block body %} 10 |

Search Restaurants

11 | {% for restaurant in restaurants %} 12 |

13 | Name: {{ restaurant.name }}
14 | Borough: {{ restaurant.borough }}
15 | Cuisine: {{ restaurant.cuisine }}
16 |

17 | {% endfor %} 18 | {% endblock %} -------------------------------------------------------------------------------- /source/includes/php-frameworks/symfony/doctrine_mongodb.yaml: -------------------------------------------------------------------------------- 1 | doctrine_mongodb: 2 | auto_generate_proxy_classes: true 3 | auto_generate_hydrator_classes: true 4 | connections: 5 | default: 6 | server: "%env(resolve:MONGODB_URL)%" 7 | default_database: "%env(resolve:MONGODB_DB)%" 8 | document_managers: 9 | default: 10 | auto_mapping: true 11 | mappings: 12 | App: 13 | dir: "%kernel.project_dir%/src/Document" 14 | mapping: true 15 | type: attribute 16 | prefix: 'App\Document' 17 | is_bundle: false 18 | alias: App 19 | -------------------------------------------------------------------------------- /source/includes/php-frameworks/symfony/index.html.twig: -------------------------------------------------------------------------------- 1 | {# templates/restaurant/index.html.twig #} 2 | 3 | {% extends 'base.html.twig' %} 4 | 5 | {% block body %} 6 |

Welcome to the Symfony MongoDB Quickstart!

7 | {% endblock %} 8 | -------------------------------------------------------------------------------- /source/includes/serverless-compatibility.rst: -------------------------------------------------------------------------------- 1 | .. note:: 2 | 3 | For information about connecting to Atlas Serverless, see the 4 | :atlas:`Serverless Instance Limitations page 5 | ` 6 | for the minimum driver version you need. 7 | -------------------------------------------------------------------------------- /source/includes/stable-api-notice.rst: -------------------------------------------------------------------------------- 1 | .. note:: 2 | 3 | Starting from February 2022, the **Versioned API** is known as the **{+stable-api+}**. 4 | All concepts and features remain the same with this naming change. 5 | 6 | -------------------------------------------------------------------------------- /source/includes/university-m220p.rst: -------------------------------------------------------------------------------- 1 | Take the Free Online Course Taught by MongoDB 2 | --------------------------------------------- 3 | 4 | .. list-table:: 5 | 6 | * - .. figure:: /figures/M220P_hero.jpg 7 | :alt: Banner for the MongoDB University Python Course 8 | 9 | - `Using MongoDB with Python `__ 10 | 11 | Learn the essentials of Python application development with MongoDB. 12 | 13 | -------------------------------------------------------------------------------- /source/index.txt: -------------------------------------------------------------------------------- 1 | :template: drivers-index 2 | :hidefeedback: header 3 | :noprevnext: 4 | 5 | ============================= 6 | Start Developing with MongoDB 7 | ============================= 8 | 9 | .. meta:: 10 | :description: Connect your application to your MongoDB Atlas deployment or a self-hosted MongoDB cluster by using one of the official MongoDB client libraries. 11 | :keywords: r, elixir, prisma, mongoose 12 | 13 | You can connect your application to your MongoDB Atlas deployment or a 14 | self-hosted MongoDB cluster by using one of the official MongoDB 15 | libraries. To learn more about Atlas, see :atlas:`What is MongoDB Atlas? `. To learn how to download and install a self-hosted 16 | MongoDB cluster, see :manual:`Install MongoDB `. 17 | 18 | The following libraries are officially supported by MongoDB. MongoDB actively 19 | develops new features, adds performance enhancements, fixes bugs, and applies 20 | security patches to them. 21 | 22 | .. card-group:: 23 | :columns: 3 24 | :layout: default 25 | :type: drivers 26 | 27 | .. card:: 28 | :headline: C 29 | :url: https://www.mongodb.com/docs/languages/c/ 30 | :icon: /icons/c.svg 31 | :icon-alt: C Driver icon 32 | 33 | .. card:: 34 | :headline: C++ 35 | :url: https://www.mongodb.com/docs/languages/cpp/ 36 | :icon: /icons/c++.svg 37 | :icon-alt: C plus plus Driver icon 38 | 39 | .. card:: 40 | :headline: C# 41 | :url: https://www.mongodb.com/docs/languages/csharp/ 42 | :icon: /icons/csharp.svg 43 | :icon-alt: C sharp Driver icon 44 | 45 | .. card:: 46 | :headline: Go 47 | :url: https://www.mongodb.com/docs/languages/go/ 48 | :icon: /icons/go.svg 49 | :icon-alt: Go Driver icon 50 | 51 | .. card:: 52 | :headline: Java 53 | :url: https://www.mongodb.com/docs/languages/java/ 54 | :icon: /icons/java.svg 55 | :icon-dark: /icons/java-dark.svg 56 | :icon-alt: Java Driver icon 57 | 58 | .. card:: 59 | :headline: Kotlin 60 | :url: https://www.mongodb.com/docs/languages/kotlin/ 61 | :icon: /icons/kotlin.svg 62 | :icon-alt: Kotlin Driver icon 63 | 64 | .. card:: 65 | :headline: Node.js 66 | :url: https://www.mongodb.com/docs/languages/javascript/ 67 | :icon: /icons/node.svg 68 | :icon-dark: /icons/node-dark.svg 69 | :icon-alt: Node Driver icon 70 | 71 | .. card:: 72 | :headline: PHP 73 | :url: https://www.mongodb.com/docs/languages/php/ 74 | :icon: /icons/php.svg 75 | :icon-alt: PHP Driver icon 76 | 77 | .. card:: 78 | :headline: Python 79 | :url: https://www.mongodb.com/docs/languages/python/ 80 | :icon: /icons/python.svg 81 | :icon-alt: Python Driver icon 82 | 83 | .. card:: 84 | :headline: Ruby 85 | :url: https://www.mongodb.com/docs/languages/ruby/ 86 | :icon: /icons/ruby.svg 87 | :icon-alt: Ruby Driver icon 88 | 89 | .. card:: 90 | :headline: Rust 91 | :url: https://www.mongodb.com/docs/languages/rust/ 92 | :icon: /icons/rust.svg 93 | :icon-dark: /icons/rust-dark.svg 94 | :icon-alt: Rust Driver icon 95 | 96 | .. card:: 97 | :headline: Scala 98 | :url: https://www.mongodb.com/docs/languages/scala/ 99 | :icon: /icons/scala.svg 100 | :icon-alt: Scala Driver icon 101 | 102 | .. card:: 103 | :headline: Swift 104 | :url: /swift/ 105 | :icon: /icons/swift.svg 106 | :icon-alt: Swift Driver icon 107 | 108 | .. card:: 109 | :headline: TypeScript 110 | :url: https://www.mongodb.com/docs/languages/javascript/ 111 | :icon: /icons/ts.svg 112 | :icon-alt: TypeScript Driver icon 113 | 114 | 115 | Featured Community-Supported Libraries 116 | ----------------------------------------- 117 | 118 | .. card-group:: 119 | :columns: 3 120 | :layout: carousel 121 | :type: drivers 122 | 123 | .. card:: 124 | :cta: Elixir 125 | :url: https://github.com/zookzook/elixir-mongodb-driver 126 | :icon: /icons/elixir.svg 127 | :icon-alt: Elixir icon 128 | 129 | .. card:: 130 | :cta: Mongoose 131 | :url: https://mongoosejs.com/docs/index.html 132 | :icon: /icons/mongoose.svg 133 | :icon-alt: Mongoose icon 134 | 135 | .. card:: 136 | :cta: Prisma 137 | :url: https://www.prisma.io/docs/guides/database/mongodb 138 | :icon: /icons/prisma.svg 139 | :icon-dark: /icons/prisma-dark.svg 140 | :icon-alt: Prisma icon 141 | 142 | .. card:: 143 | :cta: R 144 | :url: https://cran.r-project.org/web/packages/mongolite/ 145 | :icon: /icons/r.svg 146 | :icon-alt: R icon 147 | 148 | Don't see your desired language? Browse more `community-supported libraries `__. 149 | 150 | Compatibility with Other Document Databases 151 | ------------------------------------------- 152 | 153 | See the following pages for information about other document databases' compatibility 154 | with MongoDB: 155 | 156 | - :ref:`documentdb-compat` 157 | - :ref:`cosmosdb-compat` 158 | 159 | .. toctree:: 160 | 161 | C Driver 162 | C++ Driver 163 | .NET/C# Driver 164 | Go Driver 165 | Java Drivers 166 | Kotlin Drivers 167 | Node.js Driver 168 | PHP Driver 169 | Python Drivers 170 | Ruby Drivers 171 | Rust Driver 172 | Scala Driver 173 | Swift Driver
174 | TypeScript 175 | About Compatibility Tables 176 | Other Document Database Compatibility 177 | -------------------------------------------------------------------------------- /source/java-drivers.txt: -------------------------------------------------------------------------------- 1 | .. _java-language-center: 2 | 3 | ==================== 4 | MongoDB Java Drivers 5 | ==================== 6 | 7 | .. default-domain:: mongodb 8 | 9 | .. facet:: 10 | :name: programming_language 11 | :values: java 12 | 13 | .. facet:: 14 | :name: genre 15 | :values: reference 16 | 17 | .. meta:: 18 | :description: Use the Java Sync and Reactive Streams drivers to connect your application to work with MongoDB in Java. 19 | :keywords: java sync, java async, reactive streams 20 | 21 | .. toctree:: 22 | :titlesonly: 23 | 24 | Java Sync Driver 25 | Java Reactive Streams Driver 26 | 27 | .. contents:: On this page 28 | :local: 29 | :backlinks: none 30 | :depth: 1 31 | 32 | Introduction 33 | ------------ 34 | 35 | Welcome to the documentation site for the official MongoDB Java 36 | drivers. You can add one of the following drivers to your application 37 | to work with MongoDB in Java: 38 | 39 | - Use the `Java Driver `__ 40 | for synchronous Java applications. 41 | 42 | - Use the `Java Reactive Streams Driver 43 | `__ 44 | to use the Reactive Streams API for asynchronous stream processing. 45 | 46 | Compatibility 47 | ------------- 48 | 49 | You can use the Java drivers to connect to deployments hosted in the 50 | following environments: 51 | 52 | .. include:: /includes/fact-environments.rst 53 | 54 | Take the free online course taught by MongoDB 55 | --------------------------------------------- 56 | 57 | .. list-table:: 58 | 59 | * - .. figure:: /figures/M220J_hero.jpg 60 | :alt: MongoDB Java Course Hero 61 | 62 | - `Using MongoDB with Java `_ 63 | 64 | Learn the essentials of Java application development with MongoDB. 65 | -------------------------------------------------------------------------------- /source/kotlin-drivers.txt: -------------------------------------------------------------------------------- 1 | .. _kotlin-language-center: 2 | 3 | ====================== 4 | MongoDB Kotlin Drivers 5 | ====================== 6 | 7 | .. meta:: 8 | :description: Explore options for integrating MongoDB with Kotlin applications using Coroutine or Sync drivers. 9 | 10 | .. toctree:: 11 | :titlesonly: 12 | 13 | Kotlin Coroutine Driver 14 | Kotlin Sync Driver 15 | 16 | .. contents:: On this page 17 | :local: 18 | :backlinks: none 19 | :depth: 1 20 | :class: singlecol 21 | 22 | Introduction 23 | ------------ 24 | 25 | Welcome to the documentation site for the official MongoDB Kotlin 26 | drivers. You can add one of the following drivers to your application 27 | to work with MongoDB in Kotlin: 28 | 29 | - Use the `Kotlin Coroutine Driver `__ 30 | for Kotlin applications using coroutines. 31 | 32 | - Use the `Kotlin Sync Driver `__ for synchronous Kotlin 33 | applications. 34 | -------------------------------------------------------------------------------- /source/kotlin.md: -------------------------------------------------------------------------------- 1 | HELLO FROM THE PLATFORM! 2 | 3 | Do not create a Kotlin.rst file or you'll end up deleting 4 | the kotlin driver docs. 5 | 6 | Thank you for your collaboration, 7 | Docs Platform 8 | -------------------------------------------------------------------------------- /source/motor.txt: -------------------------------------------------------------------------------- 1 | .. _python-async-driver: 2 | 3 | ==================== 4 | Motor (Async Driver) 5 | ==================== 6 | 7 | .. facet:: 8 | :name: genre 9 | :values: reference 10 | 11 | .. facet:: 12 | :name: programming_language 13 | :values: python 14 | 15 | .. meta:: 16 | :keywords: Python async, Stable API, local connection, atlas, code example 17 | :description: Explore Motor, the async Python driver for MongoDB, with installation guides, connection examples, and compatibility details. 18 | 19 | .. contents:: On this page 20 | :local: 21 | :backlinks: none 22 | :depth: 1 23 | :class: twocols 24 | 25 | Introduction 26 | ------------ 27 | 28 | Welcome to the documentation site for Motor, the official MongoDB 29 | driver for asynchronous Python applications. Download it using 30 | `pip `__ 31 | or set up a runnable project by following our tutorials. 32 | 33 | .. tip:: 34 | 35 | If you do not need to access MongoDB in a non-blocking manner or from 36 | co-routines, we recommend that you use the `PyMongo 37 | `__ 38 | driver instead. 39 | 40 | - `Tutorial on using Motor with Tornado `__ 41 | 42 | - `Tutorial on using Motor with asyncio `__ 43 | 44 | - `Motor Documentation `__ 45 | 46 | - `Changelog `__ 47 | 48 | - `Source Code `__ 49 | 50 | Follow the links below to read blog posts that describe specific use cases 51 | for the Motor driver: 52 | 53 | - `Porting From PyMongo To Motor `__ 54 | 55 | - `Refactoring Tornado Coroutines `__ 56 | 57 | - `All Motor articles on A. Jesse Jiryu Davis's blog `__ 58 | 59 | Installation 60 | ------------ 61 | 62 | You must install the Motor driver module to make it available to your Python 63 | application. We recommend using `pip `__ 64 | to install Motor. 65 | 66 | The following command demonstrates how you can install the latest version of 67 | the module using the command line: 68 | 69 | .. code-block:: sh 70 | 71 | $ python -m pip install motor 72 | 73 | For more information on requirements and other methods of installation, 74 | see the `Motor Installation `__ 75 | documentation. 76 | 77 | .. _connect-atlas-motor-driver: 78 | 79 | Connect to MongoDB Atlas 80 | ------------------------ 81 | 82 | You can use the following connection snippet to test your connection to 83 | your MongoDB deployment on Atlas using the ``asyncio`` asynchronous framework: 84 | 85 | .. literalinclude:: /includes/connection-snippets/scram/py-motor-connection.py 86 | :language: python 87 | 88 | This connection snippet uses the {+stable-api+} feature, which you can 89 | enable when using the Motor driver v2.5 and later to connect to MongoDB Server 90 | v5.0 and later. When you use this feature, you can update your driver or server without 91 | worrying about backward compatibility issues with any commands covered by the 92 | {+stable-api+}. 93 | 94 | To learn more about the {+stable-api+} feature, see 95 | :manual:`{+stable-api+} ` in the Server manual. 96 | 97 | .. include:: /includes/stable-api-notice.rst 98 | 99 | .. _connect-atlas-no-stable-api-motor-driver: 100 | 101 | Connect to MongoDB Atlas Without the Stable API 102 | ----------------------------------------------- 103 | 104 | If you are using a version of MongoDB or the driver that doesn't support the 105 | {+stable-api+} feature, you can use the following code snippet to test your connection 106 | to your MongoDB deployment on Atlas: 107 | 108 | .. literalinclude:: /includes/connection-snippets/scram/py-motor-connection-no-stableapi.py 109 | :language: python 110 | 111 | If you are using the ``tornado`` asynchronous library, you can use the 112 | following code to connect to your MongoDB deployment: 113 | 114 | .. literalinclude:: /includes/connection-snippets/scram/py-motor-connection-tornado.py 115 | :language: python 116 | 117 | Connect to a MongoDB Server on Your Local Machine 118 | ------------------------------------------------- 119 | 120 | .. include:: /includes/localhost-connection.rst 121 | 122 | To test whether you can connect to your server, replace the connection 123 | string in the :ref:`Connect to MongoDB Atlas ` code 124 | example and run it. 125 | 126 | Compatibility 127 | ------------- 128 | 129 | MongoDB Compatibility 130 | ~~~~~~~~~~~~~~~~~~~~~ 131 | 132 | The following compatibility table specifies the recommended version or versions 133 | of the Motor (Python async) driver for use with a specific version of MongoDB. 134 | 135 | The first column lists the driver version. 136 | 137 | .. sharedinclude:: dbx/lifecycle-schedule-callout.rst 138 | 139 | .. include:: /includes/mongodb-compatibility-table-motor.rst 140 | 141 | .. include:: /includes/older-server-versions-unsupported.rst 142 | 143 | Language Compatibility 144 | ~~~~~~~~~~~~~~~~~~~~~~ 145 | 146 | The following compatibility table specifies the recommended version(s) of the 147 | Motor (Python async) driver for use with a specific version of Python. 148 | 149 | The first column lists the driver version(s). 150 | 151 | .. include:: /includes/language-compatibility-table-motor.rst 152 | 153 | .. include:: /includes/about-driver-compatibility.rst 154 | 155 | .. include:: /includes/help-links-motor.rst 156 | -------------------------------------------------------------------------------- /source/odm.txt: -------------------------------------------------------------------------------- 1 | .. original URL: https://www.mongodb.com/developer/products/mongodb/mongodb-orms-odms-libraries/ 2 | 3 | ========================= 4 | ORMs, ODMs, and Libraries 5 | ========================= 6 | 7 | .. facet:: 8 | :name: genre 9 | :values: reference 10 | 11 | .. meta:: 12 | :description: MongoDB has ORMs, ODMs, and Libraries to simplify interactions between your app and cluster. Use the best database for Ruby, Python, Java, C#, Node.js, PHP. 13 | :keywords: Object Oriented, abstraction, serialization, relational, 14 | 15 | .. contents:: On this page 16 | :local: 17 | :backlinks: none 18 | :depth: 1 19 | :class: twocols 20 | 21 | 22 | `MongoDB Drivers `__ offer idiomatic APIs 23 | and helpers for most programming languages, but some applications are suited to higher level 24 | abstraction. In particular, developers may be used to interacting with data in a 25 | more declarative fashion, for example by using ActiveRecord for Ruby. `Object-Relational Mappers 26 | `__ (or ORMs) 27 | can improve the developer experience customizing database interactions in the 28 | following ways: 29 | 30 | * Abstracting away the need for query language. 31 | * Managing serialization/deserialization of data into objects. 32 | * Enforcing schema requirements. 33 | 34 | Because MongoDB is a non-relational database management system, ORMs are 35 | sometimes referred to as ODMs (Object Document Mappers), but the terms can be 36 | used interchangeably in the MongoDB domain. MongoDB, our 37 | `community 38 | `__, and our 39 | partners provide several ODM libraries. 40 | 41 | The following are some examples of the best MongoDB ODM libraries for a number 42 | of programming languages, including Ruby, Python, Java, C#, Node.js, and PHP. 43 | 44 | Ruby 45 | ---- 46 | 47 | Mongoid 48 | ~~~~~~~ 49 | 50 | The Mongoid ODM provides API parity with Rails wherever possible to ensure 51 | developers that are used to working with a `Ruby on Rails 52 | `__ framework can use the methods and mechanics 53 | they’re already familiar with in ActiveRecord. 54 | 55 | See the `Mongoid documentation 56 | `__ for more information. 57 | 58 | Python 59 | ------ 60 | 61 | Beanie 62 | ~~~~~~ 63 | 64 | Beanie is a third-party, asynchronous Python ODM based on `Pydantic 65 | `__. Beanie uses corresponding documents 66 | to interact with each database collection, and supports adding, updating, and 67 | deleting documents. Beanie saves you time by removing boilerplate code, and it 68 | helps you focus on the parts of your app that actually matter. 69 | 70 | See the `Beanie documentation `__ for more information. 71 | 72 | MongoEngine 73 | ~~~~~~~~~~~ 74 | 75 | MongoEngine is a third-party, synchronous Python ORM for MongoDB. It uses a 76 | simple declarative API and is built on top of the 77 | `MongoDB PyMongo Driver `__. 78 | 79 | See the `MongoEngine documentation `__ 80 | for more information. 81 | 82 | Django 83 | ~~~~~~ 84 | 85 | Django MongoDB Backend is the official MongoDB integration for Django and 86 | MongoDB. This integration supports many core Django features, including the 87 | Django ORM. It translates Django ORM methods into equivalent MongoDB queries, 88 | allowing developers to use the familiar Django interface. 89 | 90 | See the `Django MongoDB Backend documentation 91 | `__ for 92 | more information. 93 | 94 | 95 | Java 96 | ---- 97 | 98 | Spring Data MongoDB 99 | ~~~~~~~~~~~~~~~~~~~ 100 | 101 | Spring Data MongoDB is a third-party Java ORM for MongoDB. The `Spring Data 102 | `__ project provides a familiar and 103 | consistent Spring-based programming model which is enhanced by 104 | MongoDB-specific features and capabilities. Spring Data MongoDB uses a 105 | POJO-centric model for interacting with collections and writing repository-style 106 | data access layers. 107 | 108 | See the `Spring Data MongoDB documentation 109 | `__ or the `Spring Boot 110 | Integration with MongoDB Tutorial 111 | `__ for more information. 112 | 113 | .. TODO: Hibernate 114 | 115 | .NET/C# 116 | ------- 117 | 118 | Entity Framework 119 | ~~~~~~~~~~~~~~~~ 120 | 121 | MongoDB Entity Framework Core Provider (EF Core Provider) is the official 122 | intergration for MongoDB and EF Core. It allows developers 123 | using C# in the .NET ecosystem to use `Entity Framework Core 124 | `__ as their ODM which provides a 125 | familiar API interface, query paradigm (LINQ), and design pattern. 126 | 127 | See the `EF Core provider documentation 128 | `__ for more 129 | information. 130 | 131 | Node.js 132 | ------- 133 | 134 | Mongoose 135 | ~~~~~~~~ 136 | 137 | Mongoose is a third-party Node.js-based ODM library for MongoDB. It enforces a specific 138 | schema at the application layer and offers a variety of hooks, model validation, 139 | and other features. 140 | 141 | See the `Mongoose documentation `__ or `MongoDB & 142 | Mongoose: Compatibility and Comparison 143 | `__ 144 | for more information. 145 | 146 | Prisma 147 | ~~~~~~ 148 | 149 | Prisma is a third-party ODM for Node.js and Typescript that fundamentally differs from 150 | traditional ORMs. It uses declarative Prisma schemas as the single 151 | source of truth for both your database schema and models. The Prisma client 152 | reads and writes data in a type-safe manner, and returns plain JavaScript objects. 153 | 154 | See `Prisma & MongoDB `__ for more information. 155 | 156 | PHP 157 | --- 158 | 159 | Doctrine 160 | ~~~~~~~~ 161 | 162 | Doctrine is a third-party PHP MongoDB ODM. This library provides PHP object mapping 163 | functionality and transparent persistence for PHP objects to MongoDB, as well as 164 | a mechanism to map embedded or referenced documents. It can also create 165 | references between PHP documents in different databases and work with `GridFS 166 | buckets `__. 167 | 168 | See the `Doctrine MongoDB ODM documentation 169 | `__ 170 | for more information. 171 | 172 | Symfony 173 | ~~~~~~~ 174 | 175 | The Doctrine MongoDB ODM can be used to integrate MongoDB with 176 | the Symfony PHP framework. Doctine's object mapping enables developers to get 177 | the benefits of MongoDB features, such as flexible schema design 178 | and advanced searches, alongside Symfony's reusable components and streamlined 179 | web design. 180 | 181 | See the `Symfony MongoDB Integration page 182 | `__ for more 183 | information. 184 | 185 | .. TODO? Drupal 186 | 187 | Laravel 188 | ~~~~~~~ 189 | 190 | Laravel MongoDB is the official integration for MongoDB and Laravel. It extends 191 | methods in the PHP Laravel API to provide developers the full suite of Laravel's 192 | Eloquent and Query Builder features while using MongoDB as their datastore. 193 | With this package, Laravel developers can take advantage of MongoDB's flexible schema 194 | and extensive capabilities, while maintaining familiar patterns, relationships, 195 | and features such as querying, caching, and more. 196 | 197 | See the `Laravel MongoDB documentation 198 | `__ for more 199 | information. 200 | -------------------------------------------------------------------------------- /source/other-document-dbs.txt: -------------------------------------------------------------------------------- 1 | ===================================== 2 | Other Document Database Compatibility 3 | ===================================== 4 | 5 | .. meta:: 6 | :description: Explore compatibility information between MongoDB and other document databases like Amazon DocumentDB and Azure Cosmos DB. 7 | 8 | .. toctree:: 9 | :titlesonly: 10 | :maxdepth: 1 11 | 12 | /documentdb-support 13 | /cosmosdb-support 14 | /odm 15 | 16 | See the following pages for information about other document databases' compatibility 17 | with MongoDB: 18 | 19 | - :ref:`documentdb-compat` 20 | - :ref:`cosmosdb-compat` 21 | 22 | -------------------------------------------------------------------------------- /source/php-drivers.txt: -------------------------------------------------------------------------------- 1 | .. _php-language-center: 2 | 3 | ================== 4 | MongoDB PHP Driver 5 | ================== 6 | 7 | .. facet:: 8 | :name: programming_language 9 | :values: php 10 | 11 | .. facet:: 12 | :name: genre 13 | :values: tutorial 14 | 15 | .. meta:: 16 | :description: Use the PHP driver and libraries to connect to MongoDB Atlas, Enterprise, and Community database deployments. 17 | :keywords: code example 18 | 19 | .. toctree:: 20 | :titlesonly: 21 | 22 | Laravel MongoDB 23 | Symfony Integration 24 | Drupal Integration 25 | Libraries, Frameworks, & Tools 26 | 27 | .. contents:: On this page 28 | :local: 29 | :backlinks: none 30 | :depth: 1 31 | :class: twocols 32 | 33 | Introduction 34 | ------------ 35 | 36 | Welcome to the documentation site for the official MongoDB PHP driver. 37 | You can add the driver to your application to work with MongoDB in PHP. 38 | The MongoDB PHP Driver consists of the following components: 39 | 40 | - `Extension `__: 41 | Provides a low-level API and mainly serves to integrate 42 | the `libmongoc `__ and 43 | `libbson `__ libraries with PHP. 44 | 45 | - `Library `__: 46 | Provides a high-level API for working with MongoDB 47 | databases consistent with other MongoDB language drivers. 48 | 49 | While it is possible to use only the extension, we recommend 50 | using the extension and the library together. To learn more about 51 | the components of the PHP driver, see the :ref:`php-driver-arch` section 52 | of this page. 53 | 54 | View the following guides to learn more about the driver and access 55 | tutorial content on setting up a runnable project: 56 | 57 | - `Get Started with the PHP Library `__ 58 | - `Connect to MongoDB `__ 59 | 60 | Reference 61 | ~~~~~~~~~ 62 | 63 | - :github:`Release Notes ` 64 | - :github:`Driver Source Code ` 65 | 66 | .. _php-driver-arch: 67 | 68 | Driver Architecture 69 | ------------------- 70 | 71 | This section describes how the components of the PHP driver work together. 72 | These components fit into the following general categories: 73 | 74 | - High-Level API, which includes the library and other integrations 75 | - Extension, which includes the extension that integrates the system libraries 76 | - System, which includes the C Driver, BSON library, and encryption library 77 | 78 | The following diagram illustrates the architecture of the PHP driver 79 | components: 80 | 81 | .. figure:: /figures/PHP_driver_architecture.svg 82 | :alt: PHP driver component architecture 83 | :figwidth: 600px 84 | 85 | The PHP library provides an API that is consistent with the other 86 | MongoDB drivers. The library is continually updated to meet cross-driver 87 | specifications. You must add the library as a dependency to access 88 | MongoDB in most PHP applications. 89 | 90 | The extension is distributed by using `PECL 91 | `__, and 92 | connects PHP to the system libraries. The extension's public API 93 | provides the following functionality: 94 | 95 | - Connection management 96 | - BSON encoding and decoding 97 | - Object document serialization 98 | - Command execution 99 | - Cursor management 100 | 101 | To learn more about the system libraries, see the `C Driver 102 | `__ documentation. 103 | 104 | Connect to a Compatible MongoDB Deployment 105 | ------------------------------------------ 106 | 107 | You can use the PHP driver to connect to deployments hosted in the 108 | following environments: 109 | 110 | .. include:: /includes/fact-environments.rst 111 | 112 | Installation 113 | ------------ 114 | 115 | Make sure you have a recent version of PHP installed on your 116 | system. See the `PHP manual `__ 117 | for download and installation instructions. 118 | 119 | Install the PHP MongoDB Extension before you install the MongoDB PHP 120 | Library. You can install the extension by using `PECL 121 | `__ on the 122 | command line: 123 | 124 | .. code-block:: sh 125 | 126 | sudo pecl install mongodb 127 | 128 | After installation completes, add the following line to your ``php.ini`` 129 | file: 130 | 131 | .. code-block:: text 132 | 133 | extension=mongodb.so 134 | 135 | .. note:: 136 | 137 | On some systems, there might be multiple ``.ini`` files for 138 | individual SAPIs, such as CLI, FPM. Make sure to enable the extension 139 | in all SAPIs that you use. 140 | 141 | Then, install the PHP library by using `Composer 142 | `__. Run the following command from your 143 | project directory: 144 | 145 | .. code-block:: sh 146 | 147 | composer require mongodb/mongodb 148 | 149 | After installation completes, ensure that your application includes 150 | Composer's autoloader as shown in the following example: 151 | 152 | .. code-block:: php 153 | 154 | `__ contains reference 160 | materials and tutorials that demonstrate how to interact with your 161 | MongoDB data. 162 | 163 | Compatibility 164 | ------------- 165 | 166 | Due to potential problems representing 64-bit integers on 32-bit platforms, 167 | users are advised to use 64-bit environments. When using a 32-bit platform, be 168 | aware that any 64-bit integer read from the database will be returned as a 169 | `MongoDB\\BSON\\Int64 `__ 170 | instance instead of a PHP integer type. 171 | 172 | MongoDB Compatibility 173 | ~~~~~~~~~~~~~~~~~~~~~ 174 | 175 | The following compatibility table specifies the recommended version or versions 176 | of the PHP driver for use with a specific version of MongoDB. 177 | 178 | The first column lists the driver version. 179 | 180 | .. sharedinclude:: dbx/lifecycle-schedule-callout.rst 181 | 182 | .. sharedinclude:: dbx/mongodb-compatibility-table-php.rst 183 | 184 | Language Compatibility 185 | ~~~~~~~~~~~~~~~~~~~~~~ 186 | 187 | The following compatibility table specifies the recommended version or versions 188 | of the PHP driver for use with a specific version of PHP. 189 | 190 | The first column lists the driver versions. 191 | 192 | .. sharedinclude:: dbx/language-compatibility-table-php.rst 193 | 194 | .. include:: /includes/about-driver-compatibility.rst 195 | 196 | .. include:: /includes/help-links-php.rst 197 | -------------------------------------------------------------------------------- /source/php-frameworks/drupal.txt: -------------------------------------------------------------------------------- 1 | .. _php-drupal-integration: 2 | 3 | ========================== 4 | Drupal MongoDB Integration 5 | ========================== 6 | 7 | .. facet:: 8 | :name: genre 9 | :values: reference 10 | 11 | .. meta:: 12 | :keywords: php framework, CMS, web app, authentication, Atlas 13 | 14 | .. contents:: On this page 15 | :local: 16 | :backlinks: none 17 | :depth: 2 18 | :class: singlecol 19 | 20 | Overview 21 | -------- 22 | 23 | In this guide, you can learn about the benefits of using MongoDB Atlas 24 | as the database for Drupal sites. 25 | 26 | `Drupal `__ is an open-source web content 27 | management system (CMS) written in PHP. Drupal provides simple content 28 | authoring, composability, and robust authentication features. 29 | 30 | The :ref:`php-drupal-tutorial` section of this guide links to a tutorial 31 | that you can follow to set up a Drupal site that connects to MongoDB Atlas. 32 | 33 | The :ref:`php-drupal-resources` section contains links to resources and 34 | documentation for further learning. 35 | 36 | Why Use MongoDB as the Database for Drupal Sites? 37 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 38 | 39 | Websites that seek to provide personalized user experiences must contain 40 | robust capabilities for user authentication. Sites that have many 41 | authenticated users might face performance impacts due to the complexity 42 | of retrieving entity data from multiple tables in a relational database. 43 | MongoDB eliminates the need for complicated table joins and 44 | thus increases data retrieval speed, enhancing user experience of 45 | components such as personalized dashboards and dynamic content feeds. 46 | 47 | When you use MongoDB Atlas as your site's database, Drupal stores entity 48 | instances as JSON objects that contain all revisions, translations, and 49 | field data. This flexible data structure decreases latency and allows 50 | Drupal to support personalized, user-focused experiences. 51 | 52 | MongoDB offers the following features that improve your Drupal sites: 53 | 54 | - Horizontal scaling: Distribute loads across multiple 55 | servers, making your database scalable for large user bases. 56 | 57 | - Integrated file storage: Store user files directly in the 58 | database instead of on the web server, simplifying hosting. 59 | 60 | - Full-text search: Avoid implementing separate search 61 | solutions by leveraging the :atlas:`Atlas Search 62 | ` feature. 63 | 64 | - AI capabilities: Perform vector searches and integrate AI services by 65 | using the :atlas:`Atlas Vector Search 66 | ` feature. 67 | 68 | .. _php-drupal-tutorial: 69 | 70 | Tutorial 71 | -------- 72 | 73 | To learn how to install the MongoDB driver for Drupal and set up a site 74 | that uses MongoDB Atlas as its database, see the 75 | `How to Run Drupal on MongoDB `__ 76 | tutorial on the DEV Community website. 77 | 78 | This tutorial demonstrates how to perform the following steps: 79 | 80 | 1. Setting up a MongoDB Atlas account and deployment. 81 | 82 | #. Setting up an AWS EC2 medium instance. 83 | 84 | #. Connecting the EC2 instance to Atlas. 85 | 86 | #. Installing the following components: 87 | 88 | - Apache web server 89 | - `MongoDB PHP extension `__ 90 | - Drupal web server 91 | - Drupal core patch 92 | 93 | #. Connecting your Drupal site to Atlas. 94 | 95 | #. Adding content to Drupal and viewing how it is stored in Atlas. 96 | 97 | #. Safely shutting down your web server. 98 | 99 | .. _php-drupal-resources: 100 | 101 | Resources 102 | --------- 103 | 104 | Learn more about Drupal and MongoDB by viewing the following resources: 105 | 106 | - :website:`MongoDB Blog: Advancing Integration Between Drupal and MongoDB 107 | ` 108 | - `MongoDB module suite for Drupal `__ 109 | - `Drupal CMS User Guide `__ 110 | - :website:`Podcast: PHP, Drupal and MongoDB with David Bekker 111 | ` 112 | -------------------------------------------------------------------------------- /source/php-frameworks/symfony.txt: -------------------------------------------------------------------------------- 1 | .. _php-symfony-integration: 2 | 3 | =========================== 4 | Symfony MongoDB Integration 5 | =========================== 6 | 7 | .. facet:: 8 | :name: genre 9 | :values: tutorial 10 | 11 | .. meta:: 12 | :keywords: php framework, doctrine odm, web app 13 | :description: Build a PHP web application using Symfony with MongoDB integration, leveraging Doctrine ODM for object-document mapping and querying. 14 | 15 | .. contents:: On this page 16 | :local: 17 | :backlinks: none 18 | :depth: 2 19 | :class: singlecol 20 | 21 | Overview 22 | -------- 23 | 24 | In this guide, you can learn about the Symfony MongoDB integration and 25 | how to use this framework to build a simple PHP web application. You can 26 | read about the benefits of using Symfony to build 27 | web applications with MongoDB as your database and practice using libraries 28 | that simplify querying MongoDB. 29 | 30 | `Symfony `__ is a flexible and highly configurable 31 | framework for building PHP applications. You can use this framework to 32 | create reusable components to streamline your web app. 33 | 34 | The :ref:`php-symfony-qs` section of this guide contains a tutorial 35 | which you can follow to build a single page app that accesses data from 36 | a MongoDB collection. 37 | 38 | The :ref:`php-symfony-resources` section contains links to resources and 39 | documentation for further learning. 40 | 41 | Why Use MongoDB in a Symfony Application? 42 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 43 | 44 | By using MongoDB as a data store in a Symfony web application, you can 45 | leverage the document data model to build rich query expressions, 46 | allowing you to easily interact with data. You can also customize your 47 | connections to persist and access data to and from multiple databases 48 | and collections. 49 | 50 | In your applications, you can implement the **Doctrine MongoDB ODM**, 51 | which is an Object-Document Mapper (ODM) for MongoDB and PHP. It 52 | provides a way to work with MongoDB in Symfony, using the same 53 | principles as Doctrine ORM for relational databases. 54 | 55 | Doctrine ODM allows you to map PHP objects to MongoDB documents 56 | and query MongoDB by using a builder API. This mapping enables you to 57 | use other MongoDB features such as flexible schema design and advanced 58 | searches. To learn more about this library, see the 59 | :ref:`php-symfony-resources` section. 60 | 61 | .. _php-symfony-qs: 62 | 63 | Quick Start 64 | ----------- 65 | 66 | This tutorial shows you how to build a web application by using Symfony, a 67 | PHP framework. It includes instructions on connecting to a MongoDB cluster hosted 68 | on MongoDB Atlas and accessing and displaying data from your database. 69 | 70 | By using MongoDB as a data store in a Symfony web application, you can 71 | leverage the document data model to build rich query expressions, 72 | allowing you to easily interact with data. 73 | 74 | .. tip:: 75 | 76 | If you prefer to connect to MongoDB by using the MongoDB PHP Library without 77 | Symfony, see `Connecting to MongoDB 78 | `__ 79 | in the MongoDB PHP Library documentation. 80 | 81 | MongoDB Atlas is a fully managed cloud database service that hosts your 82 | MongoDB deployments. You can create your own free (no credit card 83 | required) MongoDB Atlas deployment by following the steps in this guide. 84 | 85 | This guide uses Doctrine ODM to allow you to map PHP objects to 86 | MongoDB documents and query MongoDB by using a builder API. 87 | 88 | Follow the steps in this guide to create a sample Symfony web application 89 | that connects to a MongoDB deployment and performs a query on the 90 | database. 91 | 92 | Prerequisites 93 | ~~~~~~~~~~~~~ 94 | 95 | To create the Quick Start application, you need the following software 96 | installed in your development environment: 97 | 98 | - `PHP `__ 99 | - `Composer `__ 100 | - `Symfony CLI `__ 101 | - A terminal app and shell. For MacOS users, use Terminal or a similar app. 102 | For Windows users, use PowerShell. 103 | 104 | .. _php-symfony-atlas-cluster: 105 | 106 | Create a MongoDB Atlas Cluster 107 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 108 | 109 | You must create a MongoDB cluster where you can store and manage your 110 | data. Complete the :atlas:`Get Started with Atlas ` 111 | guide to set up a new Atlas account and create a free tier MongoDB 112 | cluster. This tutorial also demonstrates how to load sample datasets 113 | into your cluster, including the data that is used in this tutorial. 114 | 115 | You provide instructions to the driver on where and how to connect to your 116 | MongoDB cluster by providing it with a connection string. To retrieve 117 | your connection string, follow the instructions in the :atlas:`Connect 118 | to Your Cluster ` tutorial in the 119 | Atlas documentation. 120 | 121 | .. tip:: 122 | 123 | Save your connection string in a secure location. 124 | 125 | Install MongoDB Extension 126 | ~~~~~~~~~~~~~~~~~~~~~~~~~ 127 | 128 | To learn more about installing the MongoDB extension, see the `Get 129 | Started with the PHP Library 130 | `__ tutorial. 131 | 132 | Initialize a Symfony Project 133 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 134 | 135 | Run the following command to create a skeleton Symfony project called 136 | ``restaurants``: 137 | 138 | .. code-block:: bash 139 | 140 | composer create-project symfony/skeleton restaurants 141 | 142 | Install PHP Driver and Doctrine ODM 143 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 144 | 145 | Enter your project directory, then add the MongoDB PHP driver and the 146 | Doctrine ODM bundle to your application. The bundle integrates 147 | the ODM library into Symfony so that you can read from and write objects 148 | to MongoDB. Installing the bundle also automatically adds the driver to 149 | your project. To learn more, see the :ref:`php-symfony-resources` section 150 | of this guide. 151 | 152 | Run the following commands to install the ODM: 153 | 154 | .. code-block:: bash 155 | 156 | composer require doctrine/mongodb-odm-bundle 157 | 158 | .. tip:: 159 | 160 | After running the preceding commands, you might see the 161 | following prompt: 162 | 163 | .. code-block:: bash 164 | :copyable: false 165 | 166 | Do you want to execute this recipe? 167 | 168 | Select ``yes`` from the response options to add the ODM library to your 169 | application. 170 | 171 | To ensure that Doctrine ODM is enabled in your project, verify that your 172 | ``config/bundles.php`` file contains the highlighted entry in the 173 | following code: 174 | 175 | .. code-block:: php 176 | :caption: config/bundles.php 177 | :emphasize-lines: 3 178 | 179 | return [ 180 | // ... 181 | Doctrine\Bundle\MongoDBBundle\DoctrineMongoDBBundle::class => ['all' => true], 182 | ]; 183 | 184 | Configure the ODM 185 | ````````````````` 186 | 187 | In the ``config/packages`` directory, replace the contents of your 188 | ``doctrine_mongodb.yaml`` file with the following code: 189 | 190 | .. literalinclude:: /includes/php-frameworks/symfony/doctrine_mongodb.yaml 191 | :caption: config/packages/doctrine_mongodb.yaml 192 | :language: yaml 193 | 194 | Install Frontend Dependency 195 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 196 | 197 | This project uses ``twig``, the default template engine for Symfony, to 198 | generate templates in this application. Run the following command to 199 | install the ``twig`` bundle: 200 | 201 | .. code-block:: 202 | 203 | composer require symfony/twig-bundle 204 | 205 | .. note:: 206 | 207 | This step might result in an error message about unset environment 208 | variables, but this issue is resolved in the following steps. 209 | 210 | Modify Project Files 211 | ~~~~~~~~~~~~~~~~~~~~ 212 | 213 | This section demonstrates how to modify the files in your 214 | ``restaurants`` project to create a Symfony web application that displays 215 | restaurants that match the specified criteria. 216 | 217 | Set Environment Variables 218 | ````````````````````````` 219 | 220 | In the root directory, navigate to the ``.env`` file and define the 221 | following environment variables to set your connection string and target 222 | database: 223 | 224 | .. code-block:: none 225 | :caption: .env 226 | 227 | ... 228 | 229 | MONGODB_URL= 230 | MONGODB_DB=sample_restaurants 231 | 232 | To retrieve your connection string, see the 233 | :ref:`php-symfony-atlas-cluster` step. 234 | 235 | Create Restaurant Entity and Controller 236 | ``````````````````````````````````````` 237 | 238 | Create the ``Restaurant.php`` file in the ``src/Document`` directory and 239 | paste the following code to create an entity that represents documents in 240 | the ``restaurants`` collection: 241 | 242 | .. literalinclude:: /includes/php-frameworks/symfony/Restaurant.php 243 | :caption: src/Document/Restaurant.php 244 | :language: php 245 | 246 | Next, create the ``RestaurantController.php`` file in the 247 | ``src/Controller`` directory and paste the following code to handle the 248 | endpoints in your application: 249 | 250 | .. literalinclude:: /includes/php-frameworks/symfony/RestaurantController.php 251 | :caption: src/Controller/RestaurantController.php 252 | :language: php 253 | 254 | The controller file defines the ``index()`` method, which displays text on 255 | the web app's front page. The file also defines the ``browse()`` method, 256 | which finds documents in which the ``borough`` 257 | field is ``'Queens'`` and the ``name`` field contains the string ``'Moon'``. 258 | This method then displays the documents at the ``/restaurant/browse/`` route. The 259 | ``browse()`` method uses the ``QueryBuilder`` class to construct the query. 260 | 261 | Customize Templates 262 | ``````````````````` 263 | 264 | Next, create templates to customize the web app's appearance. 265 | 266 | Create the ``templates/restaurant`` directory and populate it with the 267 | following files: 268 | 269 | - ``index.html.twig`` 270 | - ``browse.html.twig`` 271 | 272 | Paste the following code into the ``index.html.twig`` file: 273 | 274 | .. literalinclude:: /includes/php-frameworks/symfony/index.html.twig 275 | :caption: templates/restaurant/index.html.twig 276 | :language: html 277 | 278 | Paste the following code into the ``browse.html.twig`` file: 279 | 280 | .. literalinclude:: /includes/php-frameworks/symfony/browse.html.twig 281 | :caption: templates/restaurant/browse.html.twig 282 | :language: html 283 | 284 | Start your Symfony Application 285 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 286 | 287 | Run the following command from the application root directory to start 288 | your PHP built-in web server: 289 | 290 | .. code-block:: bash 291 | 292 | symfony server:start 293 | 294 | After the server starts, it outputs the following message: 295 | 296 | .. code-block:: none 297 | :copyable: false 298 | 299 | [OK] Web server listening 300 | The Web server is using PHP FPM 8.3.4 301 | http://127.0.0.1:8000 302 | 303 | Open the URL http://127.0.0.1:8000/restaurant/browse in your web browser. 304 | The page shows a list of restaurants and details about each of them, as 305 | displayed in the following screenshot: 306 | 307 | .. figure:: /includes/php-frameworks/symfony/app_render.png 308 | :alt: Restaurants web app screenshot 309 | 310 | Congratulations on completing the Quick Start tutorial! 311 | 312 | After you complete these steps, you have a Symfony web application that 313 | connects to your MongoDB deployment, runs a query on the sample data, 314 | and renders a retrieved result. 315 | 316 | .. _php-symfony-resources: 317 | 318 | Resources 319 | --------- 320 | 321 | Learn more about Symfony and MongoDB by viewing the following resources: 322 | 323 | - `Build PHP Symfony Apps with MongoDB Atlas Workshop 324 | `__ 325 | - `Symfony Documentation `__ 326 | - `Doctrine MongoDB ODM Documentation 327 | `__ 328 | - `Doctrine MongoDB Bundle Documentation 329 | `__ 330 | 331 | .. 332 | - `Doctrine MongoDB ODM GitHub Repository `__ 333 | - `Doctrine MongoDB ODM Bundle GitHub Repository `__ 334 | -------------------------------------------------------------------------------- /source/php-libraries.txt: -------------------------------------------------------------------------------- 1 | .. _php-libraries-frameworks-and-tools: 2 | 3 | ==================================== 4 | PHP Libraries, Frameworks, and Tools 5 | ==================================== 6 | 7 | .. facet:: 8 | :name: programming_language 9 | :values: php 10 | 11 | .. facet:: 12 | :name: genre 13 | :values: reference 14 | 15 | .. meta:: 16 | :keywords: plugins, document mapper, tools, third party 17 | :description: Explore PHP libraries, frameworks, and tools for integrating MongoDB, including Doctrine MongoDB ODM, Laravel, Symfony, and Yii2. 18 | 19 | .. contents:: On this page 20 | :local: 21 | :backlinks: none 22 | :depth: 2 23 | :class: singlecol 24 | 25 | Standalone Libraries 26 | -------------------- 27 | 28 | - `Doctrine MongoDB ODM `__ (Object 29 | Document Mapper) is a library that provides object-mapping functionality for 30 | MongoDB. You can use the standalone library or use one of the following 31 | framework integrations: 32 | 33 | - `Symfony `__ 34 | - `Laminas `__ (formerly Zend Framework) 35 | 36 | - `Mongo PHP Adapter `__ is a 37 | library designed to act as an adapter between applications that rely 38 | on the legacy ``mongo`` extension and the new ``mongodb`` extension. It 39 | offers the API of the legacy driver for the new driver and library. 40 | 41 | - `Mongolid `__ is a performant 42 | ODM for PHP and MongoDB. It implements both ActiveRecord and DataMapper 43 | design patterns and supports embedded and referenced documents. You can use 44 | this standalone library or use the `Laravel `__ 45 | integration. 46 | 47 | - `Xenus `__ is a MongoDB ODM 48 | that supports events, relationships, embedded documents, and more. You can 49 | use this standalone library or use the `Laravel `__ 50 | integration, which adds support for failed jobs, migrations, and events. 51 | 52 | Framework Integrations 53 | ---------------------- 54 | 55 | - Drupal 56 | 57 | - `MongoDB integration for Drupal `__. 58 | This is a collection of several modules that allow sites to store different 59 | types of Drupal data in MongoDB. The ``mongodb`` extension supports 60 | Drupal 8 and later. 61 | 62 | - :ref:`php-drupal-integration` describes the benefits of using MongoDB 63 | as a data store in a Drupal site and provides useful links to learn 64 | about using this integration. 65 | 66 | - Laravel 67 | 68 | - `Laravel MongoDB `__ 69 | is MongoDB's official Eloquent model and query builder that supports 70 | MongoDB by using the original Laravel API. This package extends the PHP 71 | Laravel classes to work with MongoDB as a datastore in your Laravel 72 | application. 73 | 74 | - Symfony 75 | 76 | - :ref:`php-symfony-integration` describes the benefits of using MongoDB 77 | as a data store in a Symfony application and includes a tutorial to 78 | build a web application that uses this integration. 79 | 80 | - You can configure the `Lock `__ 81 | and the `Session `__ 82 | to use MongoDB as a data store. 83 | 84 | - `MongoDB Bundle `__ is a 85 | bundle service integration for the official `PHP library `__. 86 | You can use it to configure connections to different databases or clusters. 87 | This integration includes a query profiler. 88 | 89 | - `DoctrineMongoDBBundle Symfony `__ 90 | This bundle integrates the Doctrine MongoDB ODM into Symfony so that you 91 | can store and retrieve objects from MongoDB. 92 | 93 | - Yii2 94 | 95 | - `MongoDB Extension for Yii 2 `__ 96 | is a MongoDB integration for the Yii 2 framework. 97 | 98 | - Flysystem 99 | 100 | - `MongoDB GridFS Adapter `__ 101 | allows you to interact with MongoDB :manual:`GridFS ` 102 | by using Flysystem. 103 | 104 | Tools and Projects 105 | ------------------ 106 | 107 | - `PHP Cache `__ is a PSR-6 cache 108 | implementation that uses MongoDB as a cache pool. This project is part of 109 | the PHP Cache organization. 110 | 111 | - `PHPfastcache `__ is a 112 | high-performance backend cache system for MongoDB. 113 | 114 | - `Enqueue `__ is a production-ready 115 | messaging solution that uses MongoDB as the message queue broker. It provides 116 | a common way for programs to create, send, and read messages. 117 | 118 | - `XHGui `__ is a web interface for the 119 | XHProf profiler, which stores profiling data in MongoDB. 120 | -------------------------------------------------------------------------------- /source/python-drivers.txt: -------------------------------------------------------------------------------- 1 | .. _python-language-center: 2 | 3 | ====================== 4 | MongoDB Python Drivers 5 | ====================== 6 | 7 | .. facet:: 8 | :name: programming_language 9 | :values: python 10 | 11 | .. meta:: 12 | :description: Use the Python drivers to connect your application to MongoDB Atlas, Enterprise, and Community database deployments. 13 | :keywords: application 14 | 15 | .. toctree:: 16 | :titlesonly: 17 | 18 | PyMongo 19 | PyMongoArrow 20 | /motor.txt 21 | 22 | .. contents:: On this page 23 | :local: 24 | :backlinks: none 25 | :depth: 1 26 | :class: singlecol 27 | 28 | Introduction 29 | ------------ 30 | 31 | Welcome to the documentation site for the official MongoDB Python 32 | drivers. Add one of the following drivers to your application to work with 33 | MongoDB in Python. 34 | 35 | PyMongo 36 | ------- 37 | 38 | You can add PyMongo to your application to work with MongoDB in Python. See 39 | the `PyMongo documentation `__ 40 | to learn how to install and begin using the driver. 41 | 42 | `PyMongoArrow `__ 43 | is a PyMongo extension for loading MongoDB query result sets as Apache Arrow tables. 44 | 45 | Motor 46 | ----- 47 | 48 | Motor is the MongoDB Python driver for asynchronous applications. See the 49 | :ref:`Motor documentation ` to learn how to install and begin 50 | using the driver. 51 | 52 | Tools and Projects 53 | ------------------ 54 | 55 | The `Full Stack FastAPI App Generator `__ 56 | simplifies setup of web applications that use the FastAPI, React, and MongoDB 57 | (FARM) stack. You can learn more about this tool on the 58 | :website:`MongoDB blog. ` 59 | 60 | .. important:: 61 | 62 | The MongoDB Full Stack FastAPI App Generator is an experimental project 63 | and is not yet supported by MongoDB. 64 | 65 | .. include:: /includes/university-m220p.rst -------------------------------------------------------------------------------- /source/ruby-drivers.txt: -------------------------------------------------------------------------------- 1 | .. _ruby-language-center: 2 | 3 | =================== 4 | MongoDB Ruby Driver 5 | =================== 6 | 7 | .. meta:: 8 | :description: Explore the MongoDB Ruby Driver and Mongoid ODM for integrating MongoDB with Ruby applications. 9 | 10 | .. toctree:: 11 | :titlesonly: 12 | 13 | Ruby Driver 14 | Ruby Mongoid ODM 15 | 16 | .. contents:: On this page 17 | :local: 18 | :backlinks: none 19 | :depth: 1 20 | :class: singlecol 21 | 22 | Introduction 23 | ------------ 24 | 25 | Welcome to the documentation site for the official MongoDB Ruby 26 | driver and the Mongoid Object Document Mapper (ODM). 27 | 28 | Ruby Driver 29 | ----------- 30 | 31 | You can add the driver to your application to work with MongoDB in 32 | Ruby. See the :ruby:`official Ruby reference documentation <>` to 33 | learn how to install and begin using the driver. 34 | 35 | Object Document Mapper 36 | ---------------------- 37 | 38 | You can use Mongoid, the official MongoDB Ruby ODM, to streamline 39 | validation, associations, and high-level data modeling functions in your 40 | application. See the `Mongoid reference documentation 41 | `__ to learn how to begin 42 | using Mongoid. 43 | -------------------------------------------------------------------------------- /source/swift.txt: -------------------------------------------------------------------------------- 1 | .. _swift-language-center: 2 | 3 | ==================== 4 | MongoDB Swift Driver 5 | ==================== 6 | 7 | .. meta:: 8 | :description: Explore how to use the MongoDB Swift driver to connect to MongoDB, noting its compatibility and installation options. 9 | 10 | .. default-domain:: mongodb 11 | 12 | .. contents:: On this page 13 | :local: 14 | :backlinks: none 15 | :depth: 1 16 | :class: twocols 17 | 18 | Introduction 19 | ------------ 20 | 21 | Welcome to the documentation site for the official MongoDB Swift 22 | driver. You can add the driver to your application to work with MongoDB 23 | in Swift. Download it with the 24 | `Swift Package Manager `__ or 25 | set up a runnable project with examples from our Usage Guide. 26 | 27 | .. important:: 28 | 29 | The Swift driver is no longer under active development as of 2022. 30 | 31 | - `Usage Guide `__ 32 | 33 | - `API Reference `__ 34 | 35 | - `Changelog `__ 36 | 37 | - `Source Code `__ 38 | 39 | 40 | Installation 41 | ------------ 42 | 43 | See `Installation `__ 44 | 45 | .. _connect-atlas-swift-driver: 46 | 47 | Connect to MongoDB Atlas 48 | ------------------------ 49 | 50 | .. include:: /includes/atlas-connect-blurb.rst 51 | 52 | .. tabs:: 53 | 54 | .. tab:: Synchronous API 55 | :tabid: swift-sync 56 | 57 | .. code-block:: swift 58 | 59 | import MongoSwiftSync 60 | 61 | defer { 62 | // free driver resources 63 | cleanupMongoSwift() 64 | } 65 | 66 | // replace the following string with your connection uri 67 | let uri = "mongodb+srv://:@/test?w=majority" 68 | let client = try MongoClient(uri) 69 | 70 | // print a list of database names 71 | print (try client.listDatabaseNames()) 72 | 73 | // your application logic 74 | 75 | .. tab:: Asynchronous API 76 | :tabid: swift-async 77 | 78 | .. code-block:: swift 79 | 80 | import MongoSwift 81 | import NIO 82 | 83 | let elg = MultiThreadedEventLoopGroup(numberOfThreads: 4) 84 | 85 | // replace the following string with your connection uri 86 | let uri = "mongodb+srv://:@/test?w=majority" 87 | 88 | let client = try MongoClient( 89 | uri, 90 | using: elg 91 | ) 92 | 93 | defer { 94 | // clean up driver resources 95 | try? client.syncClose() 96 | cleanupMongoSwift() 97 | 98 | // shut down EventLoopGroup 99 | try? elg.syncShutdownGracefully() 100 | } 101 | 102 | // print a list of database names 103 | print(try client.listDatabaseNames().wait()) 104 | 105 | // your application logic 106 | 107 | .. include:: /includes/serverless-compatibility.rst 108 | 109 | Connect to a MongoDB Server on Your Local Machine 110 | ------------------------------------------------- 111 | 112 | .. include:: /includes/localhost-connection.rst 113 | 114 | To test whether you can connect to your server, replace the connection 115 | string in the :ref:`Connect to MongoDB Atlas ` code 116 | example and run it. 117 | 118 | Compatibility 119 | ------------- 120 | 121 | MongoDB Compatibility 122 | ~~~~~~~~~~~~~~~~~~~~~ 123 | 124 | The compatibility table in this section specifies the recommended version or 125 | versions of the MongoDB Swift driver for use with a specific version of MongoDB. 126 | 127 | The first column lists the driver version. 128 | 129 | .. sharedinclude:: dbx/lifecycle-schedule-callout.rst 130 | 131 | .. include:: /includes/mongodb-compatibility-table-swift.rst 132 | 133 | Language Compatibility 134 | ~~~~~~~~~~~~~~~~~~~~~~ 135 | 136 | .. include:: /includes/language-compatibility-table-swift.rst 137 | 138 | .. include:: /includes/about-driver-compatibility.rst 139 | 140 | .. include:: /includes/help-links-swift.rst 141 | -------------------------------------------------------------------------------- /source/typescript.txt: -------------------------------------------------------------------------------- 1 | .. _typescript-center: 2 | 3 | ========== 4 | TypeScript 5 | ========== 6 | 7 | .. meta:: 8 | :description: Explore how to use TypeScript with the Node.js Driver for MongoDB applications. 9 | 10 | .. default-domain:: mongodb 11 | 12 | .. contents:: On this page 13 | :local: 14 | :backlinks: none 15 | :depth: 1 16 | :class: twocols 17 | 18 | Introduction 19 | ------------ 20 | 21 | Welcome to the documentation site for official MongoDB TypeScript support. 22 | Since TypeScript compiles to JavaScript, you can use the 23 | `{+node-driver-long+} `__ 24 | to create TypeScript applications that communicate with MongoDB. 25 | 26 | You must use version 4.0 or later of the {+node-driver-short+} to use 27 | TypeScript types with MongoDB. 28 | 29 | To learn more about the features and limitations of using TypeScript with the 30 | {+node-driver-short+}, see 31 | `TypeScript Fundamentals `__ 32 | in the {+node-driver-short+} documentation. -------------------------------------------------------------------------------- /worker.sh: -------------------------------------------------------------------------------- 1 | "build-and-stage-next-gen" 2 | --------------------------------------------------------------------------------