{"repo":"ultimaweapon/porm","free":true,"listed":false,"github":"https://github.com/ultimaweapon/porm","clone":"git clone https://github.com/ultimaweapon/porm.git","description":"ORM for PostgreSQL that derive models from migration scripts","language":"Rust","stars":19,"topics":["orm","postgresql","rust"],"license":"Apache-2.0","category":"databases-storage","readme_excerpt":"Porm Porm is a new type of ORM for PostgreSQL. Instead of defining some models in Rust, Porm parse migration scripts and generate models from it. [!WARNING] Porm currently in a pre-1.0 so prepare for a lot of breaking changes! Features - Lightweight. - The generated models in a thin layer on top of tokio-postgres API. - Database is a single source of truth. - Built-in schema migration. - Use actual parser from PostgreSQL. How it works Suppose you have the following migration scripts: Porm will generate a corresponding struct for you: The generated struct will have methods to query PostgreSQL based on table indexes: Porm also generate a helper struct to insert a new row with default values: Notice PostBuilder::new function that requires non-null columns without default value. The following code will insert a new row and construct Post value with id and published loaded from the database: Non-goals - Synchronous API. - Supports downgrade migration. - Supports other databases. Breaking changes in parser 0.3 - ParseError no longer have migration version on every variants. - Migration version will be become a migration name if Migration::name return None . Breaking changes in 0.2 - Migration::name no longer optional. - Logger::run has new signature. - Error::ExecuteMigration and Error::UpdateVersion has been updated. License This project is licensed under either of - Apache License, Version 2.0 - MIT License Unless you explicitly state otherwise, any contribution intentionally sub","default_branch":null,"files":null,"tree":[],"storefront":"/r/ultimaweapon","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ultimaweapon/porm/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}