是否可以在yesod中创建自定义rawSQL?
例如我有一个图像模型
Images
filename String
description Text Maybe
date UTCTime
deriving Show
我有
的rawSQL查询selectImages :: Handler [Entity Images]
selectImages = do
runDB $ rawSql s []
where s = "SELECT ?? from images;"
但不是此字符串查询代码SELECT ?? from images;
。我想SELECT id, CONCAT('upload/', filename) as path from images;
。
希望你提前帮助我。