Logo

Green Barrel

ORM-like API MongoDB for Rust

For simulate relationship Many-to-One and Many-to-Many, a simplified alternative (Types of selective fields with dynamic addition of elements) is used.

crates.io crates.io Green Barrel on docs.rs crates.io crates.io

Attention

MongoDB tested on versions 4.2, 4.4, 5.0, 6.0

Requirements

Install mongodb (if not installed)

Follow the link Install MongoDB.

Usage:

Basic Example

Tests for examples

Model parameters

( all parameters are optional )

| Parameter: | Default: | Description: | | :------------------ | :----------- | :--------------------------------------------------------------------------------------------------- | | dbquerydocslimit | 1000 | limiting query results. | | isadddoc | true | Create documents in the database. false - Alternatively, use it to validate data from web forms. | | isupdoc | true | Update documents in the database. | | isdeldoc | true | Delete documents from the database. | | ignorefields | empty string | Fields that are not included in the database (separated by commas). | | isuseaddition | false | Allows methods for additional actions and additional validation. | | isusehooks | false | Allows hooks methods - impl Hooks for ModelName. |

Links to Documentation

Field types

See documentation -fields.

Methods for Developers

Main

Caching

Control

Addition

Hooks

QCommons

QPaladins

Fixtures

Changelog

View the change history.

License

This project is licensed under the MIT and Apache Version 2.0