provide better comparison with other options #467
Replies: 1 comment 4 replies
-
|
Thank you for checking out, glad you're liking it!
Two topics here:
ActiveRecord is considered to be an anti-pattern. MikroORM is OOP-oriented, does instantiate classes, but does not officially support ActiveRecord, because it favors the DataMapper pattern. (source) Plain objects:
Kysely is a query builder that conceptually doesn't deal with relations. https://kysely.dev/docs/examples/select/nested-object:
As you can see, the nested objects are loaded via a sub-select in SELECT. You can't join in Kysely, but you can join them in Orchid ORM. I mean, imagine loading posts with their comments, you can do that in Kysely, but you can't straightforwardly load only those posts that have at least 1 comment - what "INNER JOIN" does. Orchid ORM has lots of relational queries that are aiming to cover what Prisma can do. Kysely does not have any of those. But Kysely does have a quite large community, active discord, and maybe there are additional extensions and plugins to enlarge functionality.
Well, not really, not much. One of such features is full text search. Better support of views is in plans for near future. There are recurrent migrations to keep your custom triggers and stored procedures, but triggers and stored procedures aren't integrated to the ORM.
Yes, Drizzle is similar to some degree.
For example: db.person.select('id').where({ firstName: 'Arnold' })In Drizzle: db.select({ id: person.id }).from(person).where(eq(person.firstName, "Arnold"));
Db migrations are just like everywhere else - either generate migrations (similar to how Prisma and Drizzle does it), or you can write them yourself (similar to Kysely and Knex, but here it's nicer). There is one difference that's worth noticing: thanks to this issue, in Orchid ORM migrations are versioned with a sequential number (by default, can be changed to timestamps). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Firstly I want to say that I really like Orchid ORM on the initial view.
However I'm missing some better comparison with other options, maybe a comparison table would be cool.
I do have some questions, and hope the community can answer them:
Beta Was this translation helpful? Give feedback.
All reactions