13 unstable releases (6 breaking)

0.7.0 May 3, 2021
0.5.0 Apr 15, 2021
0.4.4 Nov 26, 2020
0.4.0 Jul 3, 2020

#103 in Database interfaces

Download history 83/week @ 2021-01-21 67/week @ 2021-01-28 53/week @ 2021-02-04 269/week @ 2021-02-11 100/week @ 2021-02-18 108/week @ 2021-02-25 86/week @ 2021-03-04 114/week @ 2021-03-11 60/week @ 2021-03-18 60/week @ 2021-03-25 50/week @ 2021-04-01 50/week @ 2021-04-08 166/week @ 2021-04-15 68/week @ 2021-04-22 61/week @ 2021-04-29 104/week @ 2021-05-06

398 downloads per month

MIT/Apache

70KB
1K SLoC

Crates.io docs.rs Crates.io

MongODM

A thin ODM layer for MongoDB built upon the official Rust driver.

Main features:

  • A stronger API leveraging Rust type system
  • Data structure models are defined using the well-known serde serialization framework
  • Index support on top of the Database::run_command (index management is currently not implemented in the underlying driver)
  • Indexes synchronization
  • Additional compile-time checks for queries using macros and type associated to mongo operators (eg: And instead of "$and")

Examples

See documentation.

Tests

Some tests can be run with cargo test however most of the useful tests requires a Mongo database running and exposed on localhost:27017. These integration tests are run with cargo test -- --ignored.

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~22MB
~495K SLoC