├── .evergreen
├── config.yml
├── publish-snapshots.sh
├── run-coverage.sh
├── run-it-tests.sh
├── run-static-checks.sh
└── run-unit-tests.sh
├── .gitignore
├── .travis.yml
├── LICENSE.txt
├── README.md
├── bson
└── src
│ ├── main
│ ├── scala-2.13+
│ │ └── org
│ │ │ └── mongodb
│ │ │ └── scala
│ │ │ └── bson
│ │ │ └── collection
│ │ │ ├── immutable
│ │ │ └── Document.scala
│ │ │ └── mutable
│ │ │ └── Document.scala
│ ├── scala-2.13-
│ │ └── org
│ │ │ └── mongodb
│ │ │ └── scala
│ │ │ └── bson
│ │ │ └── collection
│ │ │ ├── immutable
│ │ │ └── Document.scala
│ │ │ └── mutable
│ │ │ └── Document.scala
│ └── scala
│ │ └── org
│ │ └── mongodb
│ │ └── scala
│ │ └── bson
│ │ ├── BsonElement.scala
│ │ ├── BsonMagnets.scala
│ │ ├── BsonTransformer.scala
│ │ ├── BsonValue.scala
│ │ ├── DefaultHelper.scala
│ │ ├── annotations
│ │ └── BsonProperty.scala
│ │ ├── codecs
│ │ ├── DocumentCodecProvider.scala
│ │ ├── ImmutableDocumentCodec.scala
│ │ ├── IterableCodec.scala
│ │ ├── IterableCodecProvider.scala
│ │ ├── Macros.scala
│ │ ├── MutableDocumentCodec.scala
│ │ ├── macrocodecs
│ │ │ ├── CaseClassCodec.scala
│ │ │ ├── CaseClassProvider.scala
│ │ │ └── MacroCodec.scala
│ │ └── package.scala
│ │ ├── collection
│ │ ├── BaseDocument.scala
│ │ └── package.scala
│ │ ├── conversions
│ │ └── package.scala
│ │ └── package.scala
│ └── test
│ └── scala
│ └── org
│ └── mongodb
│ └── scala
│ └── bson
│ ├── BsonTransformerSpec.scala
│ ├── BsonValueSpec.scala
│ ├── codecs
│ ├── DocumentCodecProviderSpec.scala
│ ├── ImmutableDocumentCodecSpec.scala
│ ├── IterableCodecProviderSpec.scala
│ ├── IterableCodecSpec.scala
│ ├── MacrosSpec.scala
│ └── MutableDocumentCodecSpec.scala
│ └── collections
│ ├── DocumentImplicitTypeConversion.scala
│ ├── ImmutableDocumentSpec.scala
│ └── MutableDocumentSpec.scala
├── build.sbt
├── docs
├── README.md
├── landing
│ ├── README.md
│ ├── config.toml
│ ├── content
│ │ └── .readme
│ ├── data
│ │ └── releases.toml
│ ├── layouts
│ │ ├── .readme
│ │ ├── 404.html
│ │ ├── index.html
│ │ └── partials
│ │ │ ├── assets
│ │ │ ├── analytics.html
│ │ │ ├── css.html
│ │ │ └── javascripts.html
│ │ │ ├── footer.html
│ │ │ ├── header
│ │ │ ├── main.html
│ │ │ └── topRight.html
│ │ │ ├── hero.html
│ │ │ ├── introduction.html
│ │ │ ├── meta.html
│ │ │ ├── mongodbUniversity.html
│ │ │ ├── quickStart.html
│ │ │ └── releases.html
│ └── static
│ │ ├── .nojekyll
│ │ ├── apple-touch-icon.png
│ │ ├── favicon.ico
│ │ ├── s
│ │ ├── css
│ │ │ └── frontpage.css
│ │ ├── img
│ │ │ ├── 24px-baseline-overlay.png
│ │ │ ├── back-body.png
│ │ │ ├── code-block-bg.png
│ │ │ ├── code-block-bg@2x.png
│ │ │ ├── favicon.png
│ │ │ ├── gray.png
│ │ │ ├── logo-mongodb-header.png
│ │ │ ├── mongoScalaLogo.png
│ │ │ ├── mongodb-university-logo.png
│ │ │ ├── social-facebook.png
│ │ │ ├── social-facebook@2x.png
│ │ │ ├── social-gplus.png
│ │ │ ├── social-gplus@2x.png
│ │ │ ├── social-twitter.png
│ │ │ ├── social-twitter@2x.png
│ │ │ ├── social-youtube.png
│ │ │ ├── social-youtube@2x.png
│ │ │ ├── trans-user-back.png
│ │ │ ├── trans-user-left.png
│ │ │ └── trans-user-right.png
│ │ ├── js
│ │ │ ├── frontpage.js
│ │ │ └── jquery.js
│ │ └── lib
│ │ │ ├── bootstrap-select
│ │ │ ├── bootstrap-select.js
│ │ │ ├── bootstrap-select.js.map
│ │ │ ├── bootstrap-select.min.css
│ │ │ └── bootstrap-select.min.js
│ │ │ ├── bootstrap-theme.css
│ │ │ ├── bootstrap-theme.min.css
│ │ │ ├── bootstrap-toggle
│ │ │ ├── bootstrap-toggle.min.css
│ │ │ ├── bootstrap-toggle.min.js
│ │ │ ├── bootstrap-toggle.min.js.map
│ │ │ └── bootstrap2-toggle.min.js.map
│ │ │ ├── bootstrap.css
│ │ │ ├── bootstrap.js
│ │ │ ├── bootstrap.min.css
│ │ │ ├── bootstrap.min.js
│ │ │ ├── font-awesome
│ │ │ ├── css
│ │ │ │ ├── font-awesome.css
│ │ │ │ └── font-awesome.min.css
│ │ │ ├── fonts
│ │ │ │ ├── FontAwesome.otf
│ │ │ │ ├── fontawesome-webfont.eot
│ │ │ │ ├── fontawesome-webfont.svg
│ │ │ │ ├── fontawesome-webfont.ttf
│ │ │ │ └── fontawesome-webfont.woff
│ │ │ ├── less
│ │ │ │ ├── bordered-pulled.less
│ │ │ │ ├── core.less
│ │ │ │ ├── fixed-width.less
│ │ │ │ ├── font-awesome.less
│ │ │ │ ├── icons.less
│ │ │ │ ├── larger.less
│ │ │ │ ├── list.less
│ │ │ │ ├── mixins.less
│ │ │ │ ├── path.less
│ │ │ │ ├── rotated-flipped.less
│ │ │ │ ├── spinning.less
│ │ │ │ ├── stacked.less
│ │ │ │ └── variables.less
│ │ │ └── scss
│ │ │ │ ├── _bordered-pulled.scss
│ │ │ │ ├── _core.scss
│ │ │ │ ├── _fixed-width.scss
│ │ │ │ ├── _icons.scss
│ │ │ │ ├── _larger.scss
│ │ │ │ ├── _list.scss
│ │ │ │ ├── _mixins.scss
│ │ │ │ ├── _path.scss
│ │ │ │ ├── _rotated-flipped.scss
│ │ │ │ ├── _spinning.scss
│ │ │ │ ├── _stacked.scss
│ │ │ │ ├── _variables.scss
│ │ │ │ └── font-awesome.scss
│ │ │ ├── highlight
│ │ │ ├── CHANGES.md
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── highlight.pack.js
│ │ │ └── styles
│ │ │ │ ├── arta.css
│ │ │ │ ├── ascetic.css
│ │ │ │ ├── atelier-dune.dark.css
│ │ │ │ ├── atelier-dune.light.css
│ │ │ │ ├── atelier-forest.dark.css
│ │ │ │ ├── atelier-forest.light.css
│ │ │ │ ├── atelier-heath.dark.css
│ │ │ │ ├── atelier-heath.light.css
│ │ │ │ ├── atelier-lakeside.dark.css
│ │ │ │ ├── atelier-lakeside.light.css
│ │ │ │ ├── atelier-seaside.dark.css
│ │ │ │ ├── atelier-seaside.light.css
│ │ │ │ ├── brown_paper.css
│ │ │ │ ├── brown_papersq.png
│ │ │ │ ├── codepen-embed.css
│ │ │ │ ├── color-brewer.css
│ │ │ │ ├── dark.css
│ │ │ │ ├── default.css
│ │ │ │ ├── docco.css
│ │ │ │ ├── far.css
│ │ │ │ ├── foundation.css
│ │ │ │ ├── github.css
│ │ │ │ ├── googlecode.css
│ │ │ │ ├── hybrid.css
│ │ │ │ ├── idea.css
│ │ │ │ ├── ir_black.css
│ │ │ │ ├── kimbie.dark.css
│ │ │ │ ├── kimbie.light.css
│ │ │ │ ├── magula.css
│ │ │ │ ├── mono-blue.css
│ │ │ │ ├── monokai.css
│ │ │ │ ├── monokai_sublime.css
│ │ │ │ ├── obsidian.css
│ │ │ │ ├── paraiso.dark.css
│ │ │ │ ├── paraiso.light.css
│ │ │ │ ├── pojoaque.css
│ │ │ │ ├── pojoaque.jpg
│ │ │ │ ├── railscasts.css
│ │ │ │ ├── rainbow.css
│ │ │ │ ├── school_book.css
│ │ │ │ ├── school_book.png
│ │ │ │ ├── solarized_dark.css
│ │ │ │ ├── solarized_light.css
│ │ │ │ ├── sunburst.css
│ │ │ │ ├── tomorrow-night-blue.css
│ │ │ │ ├── tomorrow-night-bright.css
│ │ │ │ ├── tomorrow-night-eighties.css
│ │ │ │ ├── tomorrow-night.css
│ │ │ │ ├── tomorrow.css
│ │ │ │ ├── vs.css
│ │ │ │ ├── xcode.css
│ │ │ │ └── zenburn.css
│ │ │ ├── jquery.tipsy.js
│ │ │ ├── tipsy.css
│ │ │ ├── underscore-min.js
│ │ │ └── zeroclipboard
│ │ │ ├── .jshintrc
│ │ │ ├── ZeroClipboard.Core.js
│ │ │ ├── ZeroClipboard.Core.min.js
│ │ │ ├── ZeroClipboard.Core.min.map
│ │ │ ├── ZeroClipboard.js
│ │ │ ├── ZeroClipboard.min.js
│ │ │ ├── ZeroClipboard.min.map
│ │ │ └── ZeroClipboard.swf
│ │ └── versions.json
└── reference
│ ├── README.md
│ ├── config.toml
│ ├── content
│ ├── bson
│ │ ├── documents.md
│ │ ├── extended-json.md
│ │ ├── index.md
│ │ └── macros.md
│ ├── builders
│ │ ├── aggregation.md
│ │ ├── filters.md
│ │ ├── index.md
│ │ ├── indexes.md
│ │ ├── projections.md
│ │ ├── sorts.md
│ │ └── updates.md
│ ├── changelog.md
│ ├── getting-started
│ │ ├── index.md
│ │ ├── installation-guide.md
│ │ ├── quick-tour-admin.md
│ │ ├── quick-tour-case-classes.md
│ │ ├── quick-tour-primer.md
│ │ └── quick-tour.md
│ ├── index.md
│ ├── integrations
│ │ └── index.md
│ ├── issues-help.md
│ ├── reference
│ │ ├── connecting
│ │ │ ├── authenticating.md
│ │ │ ├── connection-settings.md
│ │ │ ├── index.md
│ │ │ └── ssl.md
│ │ ├── crud
│ │ │ └── index.md
│ │ ├── gridfs
│ │ │ └── index.md
│ │ ├── index.md
│ │ ├── management
│ │ │ ├── index.md
│ │ │ ├── logging.md
│ │ │ └── monitoring.md
│ │ └── observables.md
│ └── upgrade.md
│ ├── data
│ ├── .readme
│ └── mongodb.toml
│ ├── layouts
│ ├── .readme
│ ├── partials
│ │ └── assets
│ │ │ ├── cssExtras.html
│ │ │ └── javascriptExtras.html
│ └── shortcodes
│ │ ├── apiref.html
│ │ ├── coreapiref.html
│ │ ├── coredocref.html
│ │ ├── distroPicker.html
│ │ ├── img.html
│ │ └── install.html
│ ├── static
│ ├── .readme
│ ├── css
│ │ └── java.css
│ ├── img
│ │ ├── mongoReactiveLogo.png
│ │ └── mongoRxLogo.png
│ ├── js
│ │ └── scala.js
│ └── lib
│ │ └── bootstrap-toggle
│ │ ├── bootstrap-toggle.min.css
│ │ ├── bootstrap-toggle.min.js
│ │ ├── bootstrap-toggle.min.js.map
│ │ └── bootstrap2-toggle.min.js.map
│ └── themes
│ └── mongodb
│ ├── LICENSE.md
│ ├── README.md
│ ├── archetypes
│ └── default.md
│ ├── data
│ └── mongodb.toml
│ ├── layouts
│ ├── _default
│ │ ├── li.html
│ │ ├── list.html
│ │ └── single.html
│ ├── index.html
│ ├── partials
│ │ ├── assets
│ │ │ ├── analytics.html
│ │ │ ├── css.html
│ │ │ ├── cssExtras.html
│ │ │ ├── javascriptExtras.html
│ │ │ └── javascripts.html
│ │ ├── footer.html
│ │ ├── header.html
│ │ ├── header
│ │ │ ├── contentHeader.html
│ │ │ ├── main.html
│ │ │ ├── search.html
│ │ │ └── topRight.html
│ │ ├── menu.html
│ │ ├── menu
│ │ │ ├── currentItem.html
│ │ │ ├── footer.html
│ │ │ ├── item.html
│ │ │ └── options.html
│ │ ├── meta.html
│ │ ├── rightColumn.html
│ │ └── welcome.html
│ └── shortcodes
│ │ ├── docsref.html
│ │ ├── note.html
│ │ └── srcref.html
│ ├── static
│ ├── .nojekyll
│ ├── apple-touch-icon.png
│ ├── css
│ │ ├── basic.css
│ │ ├── bootstrap-custom.css
│ │ ├── mongodb-docs.css
│ │ ├── overrides.css
│ │ └── reset.css
│ ├── favicon.ico
│ ├── img
│ │ ├── 24px-baseline-overlay.png
│ │ ├── back-body.png
│ │ ├── code-block-bg.png
│ │ ├── code-block-bg@2x.png
│ │ ├── favicon.png
│ │ ├── gray.png
│ │ ├── logo-mongodb-header.png
│ │ ├── social-facebook.png
│ │ ├── social-facebook@2x.png
│ │ ├── social-gplus.png
│ │ ├── social-gplus@2x.png
│ │ ├── social-twitter.png
│ │ ├── social-twitter@2x.png
│ │ ├── social-youtube.png
│ │ ├── social-youtube@2x.png
│ │ ├── trans-user-back.png
│ │ ├── trans-user-left.png
│ │ └── trans-user-right.png
│ ├── js
│ │ ├── doctools.js
│ │ ├── jquery.js
│ │ ├── navbar.js
│ │ ├── scripts.js
│ │ ├── searchtools.js
│ │ └── underscore.js
│ └── lib
│ │ ├── bootstrap-theme.css
│ │ ├── bootstrap-theme.min.css
│ │ ├── bootstrap.css
│ │ ├── bootstrap.js
│ │ ├── bootstrap.min.css
│ │ ├── bootstrap.min.js
│ │ ├── font-awesome
│ │ ├── css
│ │ │ ├── font-awesome.css
│ │ │ └── font-awesome.min.css
│ │ ├── fonts
│ │ │ ├── FontAwesome.otf
│ │ │ ├── fontawesome-webfont.eot
│ │ │ ├── fontawesome-webfont.svg
│ │ │ ├── fontawesome-webfont.ttf
│ │ │ └── fontawesome-webfont.woff
│ │ ├── less
│ │ │ ├── bordered-pulled.less
│ │ │ ├── core.less
│ │ │ ├── fixed-width.less
│ │ │ ├── font-awesome.less
│ │ │ ├── icons.less
│ │ │ ├── larger.less
│ │ │ ├── list.less
│ │ │ ├── mixins.less
│ │ │ ├── path.less
│ │ │ ├── rotated-flipped.less
│ │ │ ├── spinning.less
│ │ │ ├── stacked.less
│ │ │ └── variables.less
│ │ └── scss
│ │ │ ├── _bordered-pulled.scss
│ │ │ ├── _core.scss
│ │ │ ├── _fixed-width.scss
│ │ │ ├── _icons.scss
│ │ │ ├── _larger.scss
│ │ │ ├── _list.scss
│ │ │ ├── _mixins.scss
│ │ │ ├── _path.scss
│ │ │ ├── _rotated-flipped.scss
│ │ │ ├── _spinning.scss
│ │ │ ├── _stacked.scss
│ │ │ ├── _variables.scss
│ │ │ └── font-awesome.scss
│ │ ├── highlight
│ │ ├── CHANGES.md
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── highlight.pack.js
│ │ └── styles
│ │ │ ├── arta.css
│ │ │ ├── ascetic.css
│ │ │ ├── atelier-dune.dark.css
│ │ │ ├── atelier-dune.light.css
│ │ │ ├── atelier-forest.dark.css
│ │ │ ├── atelier-forest.light.css
│ │ │ ├── atelier-heath.dark.css
│ │ │ ├── atelier-heath.light.css
│ │ │ ├── atelier-lakeside.dark.css
│ │ │ ├── atelier-lakeside.light.css
│ │ │ ├── atelier-seaside.dark.css
│ │ │ ├── atelier-seaside.light.css
│ │ │ ├── brown_paper.css
│ │ │ ├── brown_papersq.png
│ │ │ ├── codepen-embed.css
│ │ │ ├── color-brewer.css
│ │ │ ├── dark.css
│ │ │ ├── default.css
│ │ │ ├── docco.css
│ │ │ ├── far.css
│ │ │ ├── foundation.css
│ │ │ ├── github.css
│ │ │ ├── googlecode.css
│ │ │ ├── hybrid.css
│ │ │ ├── idea.css
│ │ │ ├── ir_black.css
│ │ │ ├── kimbie.dark.css
│ │ │ ├── kimbie.light.css
│ │ │ ├── magula.css
│ │ │ ├── mono-blue.css
│ │ │ ├── monokai.css
│ │ │ ├── monokai_sublime.css
│ │ │ ├── obsidian.css
│ │ │ ├── paraiso.dark.css
│ │ │ ├── paraiso.light.css
│ │ │ ├── pojoaque.css
│ │ │ ├── pojoaque.jpg
│ │ │ ├── railscasts.css
│ │ │ ├── rainbow.css
│ │ │ ├── school_book.css
│ │ │ ├── school_book.png
│ │ │ ├── solarized_dark.css
│ │ │ ├── solarized_light.css
│ │ │ ├── sunburst.css
│ │ │ ├── tomorrow-night-blue.css
│ │ │ ├── tomorrow-night-bright.css
│ │ │ ├── tomorrow-night-eighties.css
│ │ │ ├── tomorrow-night.css
│ │ │ ├── tomorrow.css
│ │ │ ├── vs.css
│ │ │ ├── xcode.css
│ │ │ └── zenburn.css
│ │ ├── jquery.tipsy.js
│ │ ├── tipsy.css
│ │ └── underscore-min.js
│ └── theme.toml
├── driver
└── src
│ ├── it
│ ├── resources
│ │ ├── crud
│ │ │ ├── README.rst
│ │ │ ├── db
│ │ │ │ └── db-aggregate.json
│ │ │ ├── read
│ │ │ │ ├── aggregate-collation.json
│ │ │ │ ├── aggregate-out.json
│ │ │ │ ├── aggregate.json
│ │ │ │ ├── count-collation.json
│ │ │ │ ├── count-empty.json
│ │ │ │ ├── count.json
│ │ │ │ ├── distinct-collation.json
│ │ │ │ ├── distinct.json
│ │ │ │ ├── find-collation.json
│ │ │ │ └── find.json
│ │ │ └── write
│ │ │ │ ├── bulkWrite-arrayFilters.json
│ │ │ │ ├── bulkWrite-collation.json
│ │ │ │ ├── bulkWrite.json
│ │ │ │ ├── deleteMany-collation.json
│ │ │ │ ├── deleteMany.json
│ │ │ │ ├── deleteOne-collation.json
│ │ │ │ ├── deleteOne.json
│ │ │ │ ├── findOneAndDelete-collation.json
│ │ │ │ ├── findOneAndDelete.json
│ │ │ │ ├── findOneAndReplace-collation.json
│ │ │ │ ├── findOneAndReplace-upsert.json
│ │ │ │ ├── findOneAndReplace.json
│ │ │ │ ├── findOneAndUpdate-arrayFilters.json
│ │ │ │ ├── findOneAndUpdate-collation.json
│ │ │ │ ├── findOneAndUpdate.json
│ │ │ │ ├── insertMany.json
│ │ │ │ ├── insertOne.json
│ │ │ │ ├── replaceOne-collation.json
│ │ │ │ ├── replaceOne.json
│ │ │ │ ├── updateMany-arrayFilters.json
│ │ │ │ ├── updateMany-collation.json
│ │ │ │ ├── updateMany.json
│ │ │ │ ├── updateOne-arrayFilters.json
│ │ │ │ ├── updateOne-collation.json
│ │ │ │ └── updateOne.json
│ │ ├── gridfs-tests
│ │ │ ├── delete.json
│ │ │ ├── download.json
│ │ │ ├── download_by_name.json
│ │ │ └── upload.json
│ │ └── logback-test.xml
│ └── scala
│ │ └── org
│ │ └── mongodb
│ │ └── scala
│ │ ├── CrudSpec.scala
│ │ ├── DocumentationChangeStreamExampleSpec.scala
│ │ ├── DocumentationExampleSpec.scala
│ │ ├── DocumentationTransactionsExampleSpec.scala
│ │ ├── FuturesSpec.scala
│ │ ├── MongoCollectionCaseClassSpec.scala
│ │ ├── RequiresMongoDBISpec.scala
│ │ ├── SmokeTestISpec.scala
│ │ └── gridfs
│ │ ├── GridFSObservableSpec.scala
│ │ ├── GridFSSpec.scala
│ │ └── helpers
│ │ └── AsyncStreamHelperSpec.scala
│ ├── main
│ └── scala
│ │ └── org
│ │ └── mongodb
│ │ └── scala
│ │ ├── AggregateObservable.scala
│ │ ├── AutoEncryptionSettings.scala
│ │ ├── ChangeStreamObservable.scala
│ │ ├── ClientEncryptionSettings.scala
│ │ ├── ClientSessionImplicits.scala
│ │ ├── ClientSessionOptions.scala
│ │ ├── Completed.scala
│ │ ├── DistinctObservable.scala
│ │ ├── FindObservable.scala
│ │ ├── Helpers.scala
│ │ ├── ListCollectionsObservable.scala
│ │ ├── ListDatabasesObservable.scala
│ │ ├── ListIndexesObservable.scala
│ │ ├── MapReduceObservable.scala
│ │ ├── MongoClient.scala
│ │ ├── MongoClientSettings.scala
│ │ ├── MongoCollection.scala
│ │ ├── MongoCompressor.scala
│ │ ├── MongoCredential.scala
│ │ ├── MongoDatabase.scala
│ │ ├── MongoDriverInformation.scala
│ │ ├── MongoNamespace.scala
│ │ ├── Observable.scala
│ │ ├── ObservableImplicits.scala
│ │ ├── Observer.scala
│ │ ├── ReadConcern.scala
│ │ ├── ReadConcernLevel.scala
│ │ ├── ReadPreference.scala
│ │ ├── ServerAddress.scala
│ │ ├── SingleObservable.scala
│ │ ├── Subscription.scala
│ │ ├── Tag.scala
│ │ ├── TagSet.scala
│ │ ├── TransactionOptions.scala
│ │ ├── WriteConcern.scala
│ │ ├── connection
│ │ ├── AsynchronousSocketChannelStreamFactoryFactory.scala
│ │ ├── ClusterSettings.scala
│ │ ├── ConnectionPoolSettings.scala
│ │ ├── NettyStreamFactoryFactory.scala
│ │ ├── ServerSettings.scala
│ │ ├── SocketSettings.scala
│ │ ├── SslSettings.scala
│ │ └── package.scala
│ │ ├── gridfs
│ │ ├── AsyncInputStream.scala
│ │ ├── AsyncOutputStream.scala
│ │ ├── GridFSBucket.scala
│ │ ├── GridFSDownloadObservable.scala
│ │ ├── GridFSDownloadStream.scala
│ │ ├── GridFSFindObservable.scala
│ │ ├── GridFSUploadObservable.scala
│ │ ├── GridFSUploadStream.scala
│ │ ├── helpers
│ │ │ ├── AsyncStreamHelper.scala
│ │ │ ├── AsynchronousChannelHelper.scala
│ │ │ └── package.scala
│ │ └── package.scala
│ │ ├── internal
│ │ ├── AndThenObservable.scala
│ │ ├── ExecutionContextObservable.scala
│ │ ├── FilterObservable.scala
│ │ ├── FlatMapObservable.scala
│ │ ├── FoldLeftObservable.scala
│ │ ├── IterableObservable.scala
│ │ ├── MapObservable.scala
│ │ ├── ObservableHelper.scala
│ │ ├── RecoverObservable.scala
│ │ ├── RecoverWithObservable.scala
│ │ ├── SingleItemObservable.scala
│ │ ├── SubscriptionCheckingObserver.scala
│ │ ├── WriteConcernImplicits.scala
│ │ ├── ZipObservable.scala
│ │ └── package.scala
│ │ ├── model
│ │ ├── Accumulators.scala
│ │ ├── Aggregates.scala
│ │ ├── BucketGranularity.scala
│ │ ├── Collation.scala
│ │ ├── CollationAlternate.scala
│ │ ├── CollationCaseFirst.scala
│ │ ├── CollationMaxVariable.scala
│ │ ├── CollationStrength.scala
│ │ ├── Filters.scala
│ │ ├── Indexes.scala
│ │ ├── MapReduceAction.scala
│ │ ├── MergeOptions.scala
│ │ ├── Projections.scala
│ │ ├── ReturnDocument.scala
│ │ ├── Sorts.scala
│ │ ├── Updates.scala
│ │ ├── ValidationAction.scala
│ │ ├── ValidationLevel.scala
│ │ ├── changestream
│ │ │ ├── FullDocument.scala
│ │ │ └── package.scala
│ │ ├── geojson
│ │ │ └── package.scala
│ │ ├── package.scala
│ │ └── vault
│ │ │ └── package.scala
│ │ ├── package.scala
│ │ ├── result
│ │ └── package.scala
│ │ └── vault
│ │ ├── ClientEncryption.scala
│ │ ├── ClientEncryptions.scala
│ │ └── package.scala
│ └── test
│ ├── resources
│ └── logback-test.xml
│ └── scala
│ └── org
│ └── mongodb
│ └── scala
│ ├── AggregateObservableSpec.scala
│ ├── ApiAliasAndCompanionSpec.scala
│ ├── ChangeStreamObservableSpec.scala
│ ├── DistinctObservableSpec.scala
│ ├── FindObservableSpec.scala
│ ├── ListCollectionsObservableSpec.scala
│ ├── ListDatabasesObservableSpec.scala
│ ├── ListIndexesObservableSpec.scala
│ ├── MapReduceObservableSpec.scala
│ ├── MongoClientSettingsSpec.scala
│ ├── MongoClientSpec.scala
│ ├── MongoCollectionSpec.scala
│ ├── MongoCredentialSpec.scala
│ ├── MongoDatabaseSpec.scala
│ ├── MongoDriverInformationSpec.scala
│ ├── ReadConcernLevelSpec.scala
│ ├── ReadConcernSpec.scala
│ ├── ReadPreferenceSpec.scala
│ ├── ScalaPackageSpec.scala
│ ├── connection
│ └── ConnectionSpec.scala
│ ├── gridfs
│ ├── GridFSBucketSpec.scala
│ ├── GridFSDownloadStreamSpec.scala
│ ├── GridFSFindObservableSpec.scala
│ └── GridFSUploadStreamSpec.scala
│ ├── internal
│ ├── ObservableImplementationSpec.scala
│ ├── OverridableObservableImplicitsSpec.scala
│ ├── ScalaObservableSpec.scala
│ ├── SingleObservableSpec.scala
│ ├── TestObservable.scala
│ └── TestObserver.scala
│ └── model
│ ├── AggregatesSpec.scala
│ ├── BucketGranularitySpec.scala
│ ├── CollationAlternateSpec.scala
│ ├── CollationCaseFirstSpec.scala
│ ├── CollationMaxVariableSpec.scala
│ ├── CollationSpec.scala
│ ├── CollationStrengthSpec.scala
│ ├── FiltersSpec.scala
│ ├── GeoJsonSpec.scala
│ ├── IndexesSpec.scala
│ ├── MapReduceActionSpec.scala
│ ├── MergeOptionsSpec.scala
│ ├── ModelSpec.scala
│ ├── ProjectionsSpec.scala
│ ├── ReturnDocumentSpec.scala
│ ├── SortsSpec.scala
│ ├── UpdatesSpec.scala
│ ├── ValidationActionSpec.scala
│ ├── ValidationLevelSpec.scala
│ └── vault
│ └── ClientEncryptionSpec.scala
├── examples
├── scripts
│ ├── mongoexport.scala
│ └── mongoimport.scala
└── src
│ └── test
│ └── scala
│ ├── reactivestreams
│ ├── Implicits.scala
│ ├── ReactiveStreamsExample.scala
│ └── TestSubscriber.scala
│ └── tour
│ ├── GridFSTour.scala
│ ├── Helpers.scala
│ ├── QuickTour.scala
│ ├── QuickTourAdmin.scala
│ └── QuickTourCaseClass.scala
├── project
├── Dependencies.scala
├── MongoScalaBuild.scala
├── Publish.scala
├── Resolvers.scala
├── Versioning.scala
├── build.properties
├── plugins.sbt
└── scalastyle-config.xml
├── rootdoc.txt
└── sbt
/.evergreen/publish-snapshots.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # DO NOT ECHO COMMANDS AS THEY CONTAIN SECRETS!
4 | set -o errexit # Exit the script with error if any of the commands fail
5 |
6 | # Used environment variables:
7 | # NEXUS_USERNAME
8 | # NEXUS_PASSWORD
9 | # SIGNING_KEY_ID
10 | # SIGNING_PASSWORD
11 | # RING_FILE_GPG_BASE64
12 |
13 | JAVA_HOME="/opt/java/jdk8"
14 | PUBLISH_PROPERTIES_FILE=${PROJECT_DIRECTORY}/.publishProperties
15 | SECRING_FILE=${PROJECT_DIRECTORY}/secring.gpg
16 |
17 | trap "rm ${PUBLISH_PROPERTIES_FILE}; rm ${SECRING_FILE}; exit" EXIT HUP
18 |
19 | echo ${RING_FILE_GPG_BASE64} | base64 -d > ${SECRING_FILE}
20 |
21 | echo nexusUsername=${NEXUS_USERNAME} > $PUBLISH_PROPERTIES_FILE
22 | echo nexusPassword=${NEXUS_PASSWORD} >> $PUBLISH_PROPERTIES_FILE
23 | echo signing.keyId=${SIGNING_KEY_ID} >> $PUBLISH_PROPERTIES_FILE
24 | echo signing.password=${SIGNING_PASSWORD} >> $PUBLISH_PROPERTIES_FILE
25 | echo signing.secretKeyRingFile=${SECRING_FILE} >> $PUBLISH_PROPERTIES_FILE
26 |
27 | ############################################
28 | # Main Program #
29 | ############################################
30 |
31 | echo "Publishing snapshots"
32 |
33 | ./sbt -java-home $JAVA_HOME version
34 | ./sbt -java-home $JAVA_HOME +clean +publishSnapshot -DpublishProperties=$PUBLISH_PROPERTIES_FILE
35 |
--------------------------------------------------------------------------------
/.evergreen/run-coverage.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -o xtrace # Write all commands first to stderr
4 | set -o errexit # Exit the script with error if any of the commands fail
5 |
6 | # Supported/used environment variables:
7 | # MONGODB_URI Set the suggested connection MONGODB_URI (including credentials and topology info)
8 |
9 | MONGODB_URI=${MONGODB_URI:-}
10 | JAVA_HOME="/opt/java/jdk8"
11 |
12 | ############################################
13 | # Main Program #
14 | ############################################
15 |
16 | echo "Running coverage"
17 |
18 | ./sbt -java-home $JAVA_HOME version
19 | ./sbt -java-home $JAVA_HOME coverage unit:test -Dorg.mongodb.test.uri=${MONGODB_URI}
20 | ./sbt -java-home $JAVA_HOME coverage it:test -Dorg.mongodb.test.uri=${MONGODB_URI}
21 | ./sbt -java-home $JAVA_HOME coverageAggregate
22 | ./sbt -java-home $JAVA_HOME coverageReport
23 |
--------------------------------------------------------------------------------
/.evergreen/run-it-tests.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -o xtrace # Write all commands first to stderr
4 | set -o errexit # Exit the script with error if any of the commands fail
5 |
6 | # Supported/used environment variables:
7 | # MONGODB_URI Set the suggested connection MONGODB_URI (including credentials and topology info)
8 | # STREAM_TYPE The async stream type to test with
9 | # TOPOLOGY Allows you to modify variables and the MONGODB_URI based on test topology
10 | # Supported values: "server", "replica_set", "sharded_cluster"
11 | # SCALA_VERSION Set the version of Scala to be used.
12 |
13 |
14 | MONGODB_URI=${MONGODB_URI:-}
15 | STREAM_TYPE=${STREAM_TYPE:-}
16 | TOPOLOGY=${TOPOLOGY:-server}
17 | JAVA_HOME="/opt/java/jdk8"
18 |
19 | ############################################
20 | # Main Program #
21 | ############################################
22 |
23 | # Provision the correct connection string
24 | if [ "$TOPOLOGY" == "sharded_cluster" ]; then
25 | export MONGODB_URI="mongodb://localhost:27017"
26 | fi
27 | if [ "$TOPOLOGY" == "replica_set" ]; then
28 | export MONGODB_URI="${MONGODB_URI}&streamType=${STREAM_TYPE}"
29 | else
30 | export MONGODB_URI="${MONGODB_URI}/streamType=${STREAM_TYPE}"
31 | fi
32 |
33 | echo "Running Integration tests for Scala $SCALA_VERSION, $TOPOLOGY and connecting to $MONGODB_URI"
34 |
35 | ./sbt -java-home $JAVA_HOME version
36 | ./sbt -java-home $JAVA_HOME ++${SCALA_VERSION} it:test -Dorg.mongodb.test.uri=${MONGODB_URI}
37 |
--------------------------------------------------------------------------------
/.evergreen/run-static-checks.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -o xtrace # Write all commands first to stderr
4 | set -o errexit # Exit the script with error if any of the commands fail
5 |
6 | JAVA_HOME="/opt/java/jdk8"
7 |
8 | ############################################
9 | # Main Program #
10 | ############################################
11 |
12 | echo "Running static checks"
13 |
14 | ./sbt -java-home $JAVA_HOME version
15 | ./sbt -java-home $JAVA_HOME clean compile doc scalastyle
16 |
--------------------------------------------------------------------------------
/.evergreen/run-unit-tests.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -o xtrace # Write all commands first to stderr
4 | set -o errexit # Exit the script with error if any of the commands fail
5 |
6 | # Supported/used environment variables:
7 | # SCALA_VERSION Sets the Scala version
8 |
9 | JAVA_HOME="/opt/java/jdk8"
10 |
11 | ############################################
12 | # Main Program #
13 | ############################################
14 |
15 | echo "Running unit tests for Scala $SCALA_VERSION"
16 |
17 | ./sbt -java-home $JAVA_HOME version
18 | ./sbt -java-home $JAVA_HOME ++${SCALA_VERSION} unit:test
19 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *~
2 | .#*
3 | .git
4 | *#
5 | .java-version
6 |
7 | # os x stuff
8 | *Thumbs.db*
9 | *.DS_Store
10 |
11 | # Build artifacts
12 | target
13 |
14 | # Eclipse files
15 | .classpath
16 | .project
17 | .settings
18 |
19 | # Intellij IDEA files
20 | *.ipr
21 | *.iws
22 | *.iml
23 | *.idea
24 | workspace.xml
25 | atlassian-ide-plugin.xml
26 | *.sc
27 |
28 | # doc settings
29 | docs/reference/public
30 | docs/landing/public
31 | docs/hugo*
32 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | dist: trusty
2 | sudo: true
3 | language: scala
4 | scala:
5 | - 2.11.12
6 | - 2.12.8
7 | - 2.13.1
8 |
9 | jdk:
10 | - oraclejdk8
11 |
12 | # Branches to test
13 | branches:
14 | only:
15 | - master
16 |
17 | notifications:
18 | email:
19 | recipients:
20 | - ross@mongodb.com
21 | on_success: change
22 | on_failure: always
23 |
24 | matrix:
25 | fast_finish: true
26 |
27 | env:
28 | matrix:
29 | - MONGODB=4.0.5
30 |
31 |
32 | install:
33 | - wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-${MONGODB}.tgz
34 | - tar xzf mongodb-linux-x86_64-${MONGODB}.tgz
35 | - ${PWD}/mongodb-linux-x86_64-${MONGODB}/bin/mongod --version
36 |
37 | before_script:
38 | - mkdir ${PWD}/mongodb-linux-x86_64-${MONGODB}/data
39 | - ${PWD}/mongodb-linux-x86_64-${MONGODB}/bin/mongod --dbpath ${PWD}/mongodb-linux-x86_64-${MONGODB}/data --logpath ${PWD}/mongodb-linux-x86_64-${MONGODB}/mongodb.log --fork
40 | - echo $TRAVIS_SCALA_VERSION
41 |
42 | script:
43 | - ./sbt ++$TRAVIS_SCALA_VERSION check
44 |
45 | after_script:
46 | - pkill mongod
47 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Notice
2 |
3 | This repository has been archived, and code for the Scala driver has been moved to the [MongoDB JVM Drivers repository](https://github.com/mongodb/mongo-java-driver).
4 |
5 | To access the MongoDB Scala Driver documentation, please refer to our official documentation [here](https://www.mongodb.com/docs/languages/scala/scala-driver/current/).
6 |
7 | For the most recent release of the MongoDB Scala driver, please refer to [Maven](https://mvnrepository.com/artifact/org.mongodb.scala/mongo-scala-driver).
8 |
--------------------------------------------------------------------------------
/bson/src/main/scala/org/mongodb/scala/bson/BsonElement.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2008-present MongoDB, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.mongodb.scala.bson
18 |
19 | /**
20 | * A companion helper for a `BsonElement` - the mapping from a name to a BsonValue.
21 | *
22 | * Used by the [[BsonMagnets]] and polices valid key/value pairs types for [[Document]].
23 | *
24 | * @since 1.0
25 | */
26 | object BsonElement {
27 | def apply(key: String, value: BsonValue): BsonElement = new BsonElement(key, value)
28 | }
29 |
--------------------------------------------------------------------------------
/bson/src/main/scala/org/mongodb/scala/bson/annotations/BsonProperty.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2008-present MongoDB, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.mongodb.scala.bson.annotations
18 |
19 | import scala.annotation.StaticAnnotation
20 |
21 | /**
22 | * Annotation to change the stored key of a property
23 | *
24 | * @param key the key for the stored property
25 | */
26 | case class BsonProperty(key: String) extends StaticAnnotation
27 |
--------------------------------------------------------------------------------
/bson/src/main/scala/org/mongodb/scala/bson/codecs/DocumentCodecProvider.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2008-present MongoDB, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.mongodb.scala.bson.codecs
18 |
19 | import org.bson.codecs.Codec
20 | import org.bson.codecs.configuration.{ CodecProvider, CodecRegistry }
21 | import org.mongodb.scala.bson.collection.{ immutable, mutable }
22 |
23 | /**
24 | * A [[http://api.mongodb.org/java/current/org/bson/codecs/configuration/CodecProvider.html CodecProvider]] for the Document
25 | * class and all the default Codec implementations on which it depends.
26 | */
27 | case class DocumentCodecProvider() extends CodecProvider {
28 |
29 | val IMMUTABLE: Class[immutable.Document] = classOf[immutable.Document]
30 | val MUTABLE: Class[mutable.Document] = classOf[mutable.Document]
31 |
32 | // scalastyle:off null
33 | @SuppressWarnings(Array("unchecked"))
34 | def get[T](clazz: Class[T], registry: CodecRegistry): Codec[T] = {
35 | clazz match {
36 | case IMMUTABLE => ImmutableDocumentCodec(registry).asInstanceOf[Codec[T]]
37 | case MUTABLE => MutableDocumentCodec(registry).asInstanceOf[Codec[T]]
38 | case _ => null
39 | }
40 | }
41 | // scalastyle:on null
42 | }
43 |
--------------------------------------------------------------------------------
/bson/src/main/scala/org/mongodb/scala/bson/codecs/package.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2008-present MongoDB, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.mongodb.scala.bson
18 |
19 | import org.bson.codecs.configuration.CodecRegistries.{ fromRegistries, fromProviders }
20 | import org.bson.codecs.configuration.CodecRegistry
21 | import com.mongodb.async.client.MongoClients
22 |
23 | package object codecs {
24 |
25 | @deprecated("Please use org.mongodb.scala.MongoClient.DEFAULT_CODEC_REGISTRY instead", "2.9.0")
26 | val DEFAULT_CODEC_REGISTRY: CodecRegistry = fromRegistries(
27 | fromProviders(DocumentCodecProvider(), IterableCodecProvider()),
28 | MongoClients.getDefaultCodecRegistry
29 | )
30 |
31 | /**
32 | * Type alias to the `BsonTypeClassMap`
33 | */
34 | type BsonTypeClassMap = org.bson.codecs.BsonTypeClassMap
35 |
36 | /**
37 | * Companion to return the default `BsonTypeClassMap`
38 | */
39 | object BsonTypeClassMap {
40 | def apply(): BsonTypeClassMap = new BsonTypeClassMap()
41 | }
42 |
43 | /**
44 | * Type alias to the `BsonTypeCodecMap`
45 | */
46 | type BsonTypeCodecMap = org.bson.codecs.BsonTypeCodecMap
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/bson/src/main/scala/org/mongodb/scala/bson/collection/package.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2008-present MongoDB, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.mongodb.scala.bson
18 |
19 | /**
20 | * The collection package.
21 | */
22 | package object collection {
23 |
24 | /**
25 | * An immutable Document implementation.
26 | *
27 | * A strictly typed `Map[String, BsonValue]` like structure that traverses the elements in insertion order. Unlike native scala maps there
28 | * is no variance in the value type and it always has to be a `BsonValue`.
29 | */
30 | type Document = immutable.Document
31 |
32 | /**
33 | * An immutable Document implementation.
34 | *
35 | * A strictly typed `Map[String, BsonValue]` like structure that traverses the elements in insertion order. Unlike native scala maps there
36 | * is no variance in the value type and it always has to be a `BsonValue`.
37 | */
38 | val Document = immutable.Document
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/bson/src/main/scala/org/mongodb/scala/bson/conversions/package.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2008-present MongoDB, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.mongodb.scala.bson
18 |
19 | /**
20 | * The conversions package.
21 | */
22 | package object conversions {
23 | /**
24 | * Type alias to the Bson interface - an interface for types that are able to render themselves into a `BsonDocument`.
25 | */
26 | type Bson = org.bson.conversions.Bson
27 | }
28 |
--------------------------------------------------------------------------------
/bson/src/test/scala/org/mongodb/scala/bson/codecs/DocumentCodecProviderSpec.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2008-present MongoDB, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.mongodb.scala.bson.codecs
18 |
19 | import org.bson.codecs.configuration.CodecRegistries.fromProviders
20 |
21 | import org.mongodb.scala.bson.collection.{ Document, immutable, mutable }
22 | import org.scalatest.{ FlatSpec, Matchers }
23 |
24 | class DocumentCodecProviderSpec extends FlatSpec with Matchers {
25 |
26 | "DocumentCodecProvider" should "get the correct codec" in {
27 |
28 | val provider = DocumentCodecProvider()
29 | val registry = fromProviders(provider)
30 |
31 | provider.get[Document](classOf[Document], registry) shouldBe a[ImmutableDocumentCodec]
32 | provider.get[immutable.Document](classOf[immutable.Document], registry) shouldBe a[ImmutableDocumentCodec]
33 | provider.get[mutable.Document](classOf[mutable.Document], registry) shouldBe a[MutableDocumentCodec]
34 | Option(provider.get[String](classOf[String], registry)) shouldBe None
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/bson/src/test/scala/org/mongodb/scala/bson/codecs/IterableCodecProviderSpec.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2008-present MongoDB, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.mongodb.scala.bson.codecs
18 |
19 | import org.bson.codecs.configuration.CodecRegistries.fromProviders
20 |
21 | import org.scalatest.{ FlatSpec, Matchers }
22 |
23 | class IterableCodecProviderSpec extends FlatSpec with Matchers {
24 |
25 | "IterableCodecProvider" should "get the correct codec" in {
26 |
27 | val provider = IterableCodecProvider()
28 | val registry = fromProviders(provider)
29 |
30 | provider.get[Iterable[Any]](classOf[Iterable[Any]], registry) shouldBe a[IterableCodec]
31 | provider.get[List[String]](classOf[List[String]], registry) shouldBe a[IterableCodec]
32 | provider.get[Seq[Integer]](classOf[Seq[Integer]], registry) shouldBe a[IterableCodec]
33 | provider.get[Map[String, Integer]](classOf[Map[String, Integer]], registry) shouldBe a[IterableCodec]
34 | Option(provider.get[String](classOf[String], registry)) shouldBe None
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/build.sbt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mongodb/mongo-scala-driver/da018cb34b987038066955578ec32c257881a0fe/build.sbt
--------------------------------------------------------------------------------
/docs/README.md:
--------------------------------------------------------------------------------
1 | # MongoDB Scala Driver Documentation
2 |
3 | 1. landing - the front page of all the MongoDB Scala Driver docs
4 | 2. reference - the reference site for the current version of the driver
5 |
--------------------------------------------------------------------------------
/docs/landing/README.md:
--------------------------------------------------------------------------------
1 | # MongoDB Scala Driver Front page
2 |
3 | The static front page site for the Scala documentation portal.
4 |
5 | ## Requirements
6 | Hugo version 0.13 [download here](https://github.com/spf13/hugo/releases/tag/v0.13)
7 |
8 | Check out the hugo [quickstart guide](http://gohugo.io/overview/quickstart/).
9 |
10 | ## Running the server
11 | To run the server call the hugo command:
12 |
13 | hugo server --baseUrl=http://localhost/ --buildDrafts --watch
14 |
15 | | Options explained ||
16 | | --------------------------- |--------------------------------------------------------------------------|
17 | | server | Hugo runs its own webserver to render the files |
18 | | --baseUrl=http://localhost/ | Normally the base url will be /mongo-scala-driver for gh-pages |
19 | | --buildDrafts | Include draft posts in the output - these won't be published to gh-pages |
20 | | -- watch | Automatically reloads on file change |
21 |
22 |
23 | All generated content will appear in the `./public` folder, so you can also check the filesystem and browse it locally.
24 | For more hugo server options run: `hugo --help`
25 |
26 | ### Data
27 |
28 | All dynamic / changing data lives in `./data/mongodb.toml`
29 |
30 | Existing versions live in `static/versions.json`
31 |
--------------------------------------------------------------------------------
/docs/landing/config.toml:
--------------------------------------------------------------------------------
1 | baseurl = "/mongo-scala-driver/"
2 | languageCode = "en-us"
3 | title = "MongoDB Scala Driver"
4 | canonifyurls = false
5 |
6 | githubRepo = "mongo-scala-driver"
7 |
--------------------------------------------------------------------------------
/docs/landing/content/.readme:
--------------------------------------------------------------------------------
1 | content dir
2 |
--------------------------------------------------------------------------------
/docs/landing/data/releases.toml:
--------------------------------------------------------------------------------
1 | driverName = "mongo-scala-driver"
2 | githubRepo = "mongo-scala-driver"
3 | current = "2.9.0"
4 |
5 | [[versions]]
6 | version = "2.9.0"
7 | status = "current"
8 | docs = "./2.9"
9 | api = "./2.9/scaladoc"
10 |
11 | [[versions]]
12 | version = "2.8.0"
13 | docs = "./2.8"
14 | api = "./2.8/scaladoc"
15 |
16 | [[versions]]
17 | version = "2.7.0"
18 | docs = "./2.7"
19 | api = "./2.7/scaladoc"
20 |
21 | [[versions]]
22 | version = "2.6.0"
23 | docs = "./2.6"
24 | api = "./2.6/scaladoc"
25 |
26 | [[versions]]
27 | version = "2.5.0"
28 | docs = "./2.5"
29 | api = "./2.5/scaladoc"
30 |
31 | [[versions]]
32 | version = "2.4.2"
33 | docs = "./2.4"
34 | api = "./2.4/scaladoc"
35 |
36 | [[versions]]
37 | version = "2.3.0"
38 | docs = "./2.3"
39 | api = "./2.3/scaladoc"
40 |
41 | [[versions]]
42 | version = "2.2.1"
43 | docs = "./2.2"
44 | api = "./2.2/scaladoc"
45 |
46 | [[versions]]
47 | version = "2.1.0"
48 | docs = "./2.1"
49 | api = "./2.1/scaladoc"
50 |
51 | [[versions]]
52 | version = "2.0.0"
53 | docs = "./2.0"
54 | api = "./2.0/scaladoc"
55 |
56 | [[versions]]
57 | version = "1.2.1"
58 | docs = "./1.2"
59 | api = "./1.2/scaladoc"
60 |
61 | [[versions]]
62 | version = "1.1.1"
63 | docs = "./1.1"
64 | api = "./1.1/scaladoc"
65 |
66 | [[versions]]
67 | version = "1.0.1"
68 | docs = "./1.0"
69 | api = "./1.0/scaladoc"
70 |
--------------------------------------------------------------------------------
/docs/landing/layouts/.readme:
--------------------------------------------------------------------------------
1 | custom layouts here
2 |
--------------------------------------------------------------------------------
/docs/landing/layouts/404.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 | The next generation Scala driver for MongoDB 9 |
10 |11 | {{ range where $.Site.Data.releases.versions "version" $.Site.Data.releases.current }}{{ $.Scratch.Set "qs.currentReleasedVersion" . }}{{end }} 12 | {{$currentReleasedVersion := $.Scratch.Get "qs.currentReleasedVersion"}} 13 | Latest documentation 14 |
15 | 16 |10 | The official MongoDB Scala Driver, providing asynchronous event-based observable sequences for MongoDB. 11 |
12 | -------------------------------------------------------------------------------- /docs/landing/layouts/partials/meta.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /docs/landing/layouts/partials/mongodbUniversity.html: -------------------------------------------------------------------------------- 1 |Learn everything you need to know to get started building a MongoDB-based app. From basic installation, JSON, schema design, querying, insertion of data, indexing and working with the Java driver. 6 |
7 |8 | Learn More 9 |
10 |Release | Documentation |
---|---|
{{.version}} | 10 |Reference | API | 11 |