首页IT科技the trial that rock the world分析(Welcome to the Casbah documentation — Casbah (MongoDB + Scala Toolkit Documentation v2.1.5 document)

the trial that rock the world分析(Welcome to the Casbah documentation — Casbah (MongoDB + Scala Toolkit Documentation v2.1.5 document)

时间2025-05-03 02:09:19分类IT科技浏览3675
导读:Welcome to the Casbah Documentation. Casbah is a Scala toolkit for MongoDB—We use the term “toolkit” rather than “driver”, as Casbah integrates a layer on top of the...

Welcome to the Casbah Documentation. Casbah is a Scala toolkit for MongoDB—We use the term “toolkit            ” rather than “driver                  ”, as Casbah integrates a layer on top of the official mongo-java-driver for better integration with Scala. This is as opposed to a native implementation of the MongoDB wire protocol, which the Java driver does exceptionally well. Rather than a complete rewrite, Casbah uses implicits, and Pimp My Library code to enhance the existing Java code. Casbah’s approach is intended to add fluid, Scala-friendly syntax on top of MongoDB and handle conversions of common types. If you try to save a Scala List or Seq to MongoDB, we automatically convert it to a type the Java driver can serialize. If you read a Java type, we convert it to a comparable Scala type before it hits your code. All of this is intended to let you focus on writing the best possible Scala code using Scala idioms. A great deal of effort is put into providing you the functional and implicit conversion tools you’ve come to expect from Scala, with the power and flexibility of MongoDB. Casbah provides improved interfaces to GridFS, Map/Reduce and the core Mongo APIs. It also provides a fluid query syntax which emulates an internal DSL and allows you to write code which looks like what you might write in the JS Shell. There is also support for easily adding new serialization/deserialization mechanisms for common data types (including Joda Time, if you so choose; with some caveats - See the GridFS Section). With version 2.0, Casbah has become an official MongoDB project and will continue to improve the interaction of Scala + MongoDB. Casbah aims to remain fully compatible with the existing Java driver—it does not talk to MongoDB directly, preferring to wrap the Java code. This means you shouldn’t see any wildly unexpected behavior from the underlying Mongo interfaces when a data bug is fixed.

创心域SEO版权声明:以上内容作者已申请原创保护,未经允许不得转载,侵权必究!授权事宜、对本内容有异议或投诉,敬请联系网站管理员,我们将尽快回复您,谢谢合作!

展开全文READ MORE
王者荣耀钟无艳出什么装备无敌(王者荣耀中钟无艳怎么出装?) 如何合理优化布局?(规范标准是关键!)