You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Coming to Drizzle from Prisma, I find I miss having a a succinct schema language to describe and annotate models.
In this end I wrote a PoC Drizz for using TypeSpec to generate drizzle/schema.ts from schema.tsp. Not sure if anybody else would be interested in such a thing, it's fairly complete for Postgres, and at least shows how it could be done. It would pretty easy to write an emitter for MySql, and PSSql.
Advantages of using TypeSpec is it already has IDE support, linter support and an existing extensible grammar. As such one could add their own annotations to a model and generate DB/Rest whatever from a model.
Describe what you want
Coming to Drizzle from Prisma, I find I miss having a a succinct schema language to describe and annotate models.
In this end I wrote a PoC Drizz for using TypeSpec to generate
drizzle/schema.ts
fromschema.tsp
. Not sure if anybody else would be interested in such a thing, it's fairly complete for Postgres, and at least shows how it could be done. It would pretty easy to write an emitter for MySql, and PSSql.Advantages of using TypeSpec is it already has IDE support, linter support and an existing extensible grammar. As such one could add their own annotations to a model and generate DB/Rest whatever from a model.
Some examples can be found in the tests
The schema looks like
Thanks for the great project.
The text was updated successfully, but these errors were encountered: