Skip to content

Ormlite: An ORM in Rust for developers that love SQL

github.com/kurtbuilds
1 pointkurtbuilds3 comments
On HN

Comments

I've been working on `ormlite` for around a year, and it's now reaching the point where it's a massive boost in productivity for my Rust application server development. It's built on the amazing foundation of `sqlx`.

If you do Rust application server development, you might be interested for several reasons:

- It now auto-generates migrations from Rust structs. To my knowledge, it is the only Rust ORM with this capability.

- The join API, while in alpha, has far moving pieces than any other Rust ORM. It only relies on the table `struct`s themselves, and does not rely on relation traits (SeaORM) or modules (Diesel).

- There's little to no query builder syntax to learn. The query builder basically joins together &str fragments of raw SQL. It strikes the right level of abstraction between composability, and having near-zero learning curve for anyone who already knows SQL.

very nice.. was about to start integrating sqlx from mysql_async.. but maybe I'll try this instead.

That's great to hear!

Unfortunately, MySQL is less feature complete compared to Postgres and Sqlite. The migration auto-generation definitely won't work. Other features might be broken too. If you encounter any issues, please let me know!

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.