
Yes, I know about haskelldb.. But some more advanced optimizations can't
be expressed.. so I'd like to ask if someone has done some work in the
other direction not ensuring type safety by using the haskell type
system to derive SQL queries but to use template haskell to derive
functions from given SQL queries thereby checking them for syntax error ?
It be a little bit like SQLJ (Java tool for db connectivity)
Eg $(q "SELECT '2', 4") should result in
[(String, Int)]
and
$(q "INSERT INTO foo (2, ?1, ?2)" ) should result in
Int ->