23 releases

0.10.0 Jul 9, 2024
0.9.2 Oct 12, 2023
0.9.1 Apr 13, 2023
0.9.0 May 2, 2022
0.4.0 Jul 3, 2020

#229 in Database interfaces

Download history 25/week @ 2024-08-18 24/week @ 2024-08-25 36/week @ 2024-09-01 45/week @ 2024-09-08 56/week @ 2024-09-15 143/week @ 2024-09-22 55/week @ 2024-09-29 69/week @ 2024-10-06 63/week @ 2024-10-13 59/week @ 2024-10-20 65/week @ 2024-10-27 110/week @ 2024-11-03 67/week @ 2024-11-10 30/week @ 2024-11-17 50/week @ 2024-11-24 45/week @ 2024-12-01

194 downloads per month

MIT/Apache

71KB
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

~15–25MB
~378K SLoC