Integrating Drizzle ORM with Effect.Schema for Type Safety
Hey guys, really loving effect, and trying to embrace the huge ecosystem in any parts of my app that I should.
My question is, What is the recommended pattern for combining usage of the schema of a drizzle orm table with Effect.Schema. I'd like to setup my effect rpc with Effect.Schema and have typesafety straight from my drizzle table definitions. Is it best to use Schema.decode() or is there a way to avoid runtime validation? Or is the real answer to ditch drizzle and reach for something else in the effect ecosystem. Would love to hear peoples thoughts and how they approach database querying etc.
My question is, What is the recommended pattern for combining usage of the schema of a drizzle orm table with Effect.Schema. I'd like to setup my effect rpc with Effect.Schema and have typesafety straight from my drizzle table definitions. Is it best to use Schema.decode() or is there a way to avoid runtime validation? Or is the real answer to ditch drizzle and reach for something else in the effect ecosystem. Would love to hear peoples thoughts and how they approach database querying etc.
