9 releases

0.3.3 Oct 10, 2020
0.3.2 Oct 3, 2020
0.3.1 May 26, 2020
0.2.0 Apr 4, 2020
0.1.4 Jan 30, 2020

#2626 in Database interfaces

26 downloads per month
Used in orma-mobc

MIT license

60KB
1.5K SLoC

Rust 1K SLoC // 0.0% comments Shell 203 SLoC

orma orma logo

A PostgreSQL ORM written in Rust language

Introduction

When you feel the need to persist data as documents on PostgreSQL you often want a way to map these documents on structs.

If you have such needs and you are using PostgreSQL instead of other databases, it's probably because you also want all other cool stuff present in PostgreSQL.

orma is a special ORM for PostgreSQL written in Rust language developed just for you!

orma takes advantage of PostgreSQL JSONB data representation and doesn't give up the relational advantages of a RDBMS like PostgreSQL.

orma provides out of the box features for search and CRUD operation over your documents

orma is fast and easy to learn, with a very simple API.

Testing orma

Orma is tested against a running instance of PostgreSQL.

A docker image is provided to run the tests. If you don't want the docker image or you can't use it, or you need different parameters, you can set the following environment variables and test the library on your own environment.

  • ORMA_DB_HOSTNAME (default: "localhost")
  • ORMA_DB_PORT (default: 5433)
  • ORMA_DB_NAME (default: "pgactix")
  • ORMA_DB_USERNAME (default: "pgactix")
  • ORMA_DB_PASSWORD (default: "pgactix")

Development

When developing you will need to enable all the features of this crate, the simplest way is cargo test --all-features

Dependencies

~12MB
~222K SLoC