Using #haskell persistent's abstractions for queries and dealing with SQL feels like a mistake compared to just dealing with raw #postgresql. In the future I may look into an alternative. Using #scotty. The benefit of the database-agonisticism is outweighed by the fact that specific postgresql stuff is used at times *and* the abstractions are difficult to work with because of the documentation and the amount of code being generated that I have to work with.

Follow

@someodd SQL is a decent DSL by itself. It is quite a problem to make something even simpler than that while using it as a generation target. If you treat DB results as transport types, not the actual application data, then the only missing thing is compositionality. If you drop the pretense for multi-DB support then there's [postgresql-query](hackage.haskell.org/package/po) package that gives you free-form SQL and a method to compose larger chunks out of the smaller.

@dpwiz Maybe I'll shop around for things like postgresql-query after v1 and I notice the project is getting significant enough attention. I think it definitely just serves as a lesson by example for the general #haskell community, though (and myself).

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.