Logo

Metamorphose

Macros collection for converting Structure to Model, for a Green Barrel project.

crates.io crates.io Metamorphose on docs.rs crates.io crates.io

Macros

Model

Macro for converting Structure to green-barrel Model. The model can access the database. The model can create, update, and delete documents in collections.

Requirements

Usage

Follow the Green Barrel link.

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. |

Changelog

License

This project is licensed under the MIT and Apache Version 2.0