Open meteficha opened 11 years ago
If anything TH is introduced, I'd like to see it in a separate package.
I've been thinking for awhile about what it would take to compile actual SQL (of various dialects) to a normalising EDSL for awhile (with a code-generator ofc), so I like the spirit of this idea, but would not like a TH dependency.
@singpolyma I agree with you wholeheartedly, it would be some kind esqueleto-th
package =).
Maybe something for Yesod, which already does a lot of TH? I would love to write SQL-like and have it type safe and serialized by persistent.
Why go for SQL-like and not to a full support for (a reasonable subset of) SQL? I could imagine that you can write a quasiquoter that takes plain SQL, but parses it at compile time to verify the types and give you that benefit of an EDSL without having to learn a new language.
+1 Yes please, something like a esqueleto-th
would be very helpful. With the schema I'm working with, most of the identifiers end up so long that they appear nonsensical...
I'm not sure if this is a good or bad idea, we'd have to try it out. See http://blog.felipe.lessa.nom.br/?p=68#comment-125.