DEV Community

Discussion on: DrizzleORM v0.11 | 18 months into development

Collapse
 
langstra profile image
Wybren Kortstra • Edited

Hey there, thanks for the article and great work on the orm. I was wondering what the use case is here? From a learning perspective it is great, obviously. However, there are quite some great (and less great) orms out there.
Personally I like mikro-orm, because of the way the define entities, do transaction and compute changes before flushing them. In comparison, this feels a little more like a query builder than an orm.
Wondering about your take on it and where you expect this project is heading. And also interested in your take on other orms.

Collapse
 
_alexblokh profile image
Alex Blokh • Edited

Hey @langstra, thanks for your feedback!
The most important thing is we're not trying to abstract away from SQL, we're building abstraction on SQL, which is very important. The main goal is if you know how to solve problem in SQL you don't have to find out how to solve problem in lets say mikro-orm, cause mikro-orm enforces you to define SQL schema with annotations, abstracting SQL away from you and you now becoming a mikro-orm developer or prisma developer, you now have to solve business challenges in the domain of both mikro-orm and SQL as opposed to just solving them in SQL domain.

this feels a little more like a query builder than an orm

Yes, exactly, there're two main parts to the system. Schema definition and fully typed, flexible query builder. The goal was to again let you do everything you'd wanna do in SQL, but safe thanks to ground top strongly typed API.
The third part of the system which is an opt-in one - are migrations. We've built a CLI for you to generate migrations completely automatically, resolving renames and deletes by simply prompting you. And you have an opt-in solution to run generated migrations with us too, or you can run them however you want. We keep you in control and don't interfere which is very hard to achieve design wise.

This tool was also designed to be an opt-in solution by itself, so let's say you have a project done with knex, all you need to do is wrap knex in our session, define tables you want to be typed and you're ready to go, you can have knex and drizzle-orm side by side.

There're so much I would love to share, especially comparisons with other ORMs and stuff, both architectural and performance wise.

I'm writing a lot of stuff currently and we're about to drop a major redesign with fixes for most of the design flaws and support for MySQL and SQLite

So stay tuned!

Collapse
 
langstra profile image
Wybren Kortstra

The point about becoming an x-orm developer is a good point. Really interested in what you are about to drop in. Also would love to read more about it.