NyxCode / ormx

bringing orm-like features to sqlx
MIT License
287 stars 32 forks source link

Discussion: Additional features, road towards a full-fledged ORM #8

Closed OtaK closed 2 years ago

OtaK commented 3 years ago

Hey,

I've been thinking a lot about that stuff lately and I honestly think ormx is the perfect candidate to build on and iterate towards a full-fledged ORM.

The features I'd personally like to see are more or less the featureset of Sequelize, to be more accurate:

  1. Schema definition & synchronization
  2. Migrations [done on sqlx side]
  3. Free queries with convenience methods (see Sequelize Model Finders)

Number 3 would be pretty much just additional things to implement on Table and would be the most trivial Number 1 is a tough one, as we need to find a way to synchronize tables before sqlx compiles and checks our queries.

For instance on an empty database, a model would try to compile its queries, but the table doesn't exist yet so compilation would fail.

I'm currently experimenting here: https://github.com/OtaK/ormx/tree/otak/schema-sync

NyxCode commented 2 years ago

@OtaK did you make any progress on this? How did your experiments go? Really curious!

NyxCode commented 2 years ago

Closing this for now due to inactivity. I would happily reopen this though!