Is it possible to create a custom rawSQL in yesod?
for example i have a Model for images
Images
filename String
description Text Maybe
date UTCTime
deriving Show
and i have a rawSQL query of
selectImages :: Handler [Entity Images]
selectImages = do
runDB $ rawSql s []
where s = "SELECT ?? from images;"
but instead of this string query code SELECT ?? from images;
. I would like to SELECT id, CONCAT('upload/', filename) as path from images;
.
Hope you help me thank you in advance.