prowdsponsor / esqueleto

Bare bones, type-safe EDSL for SQL queries on persistent backends.
http://hackage.haskell.org/package/esqueleto
BSD 3-Clause "New" or "Revised" License
177 stars 51 forks source link

Add unsafeSqlCastAs for CAST( val AS type) sql, with test #140

Open trilogysci opened 8 years ago

trilogysci commented 8 years ago

Provides a more flexible method then https://github.com/prowdsponsor/esqueleto/pull/119 can be used to support constants such as CAST( '12.3' AS real) or using in expressions such as CAST((timestamp '2001-11-11 09:11:25' + interval '1 hour' ) as time)