Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Exprs not bracketed correctly #16

Closed
tomjaguarpaw opened this Issue · 1 comment

1 participant

@tomjaguarpaw
import Database.HaskellDB
import Database.HaskellDB.HDBRec
import Database.HaskellDB.DBLayout

data Age = Age
instance FieldTag Age where
  fieldName _ = "age"

age :: Attr Age Int
age = mkAttr Age

r :: Query (Rel (RecCons Age (Expr Int) RecNil))
r = do
  project (age << (constant 1 ./. (constant 2 ./. constant 3)))

showIt :: String
showIt = showSql r


*Main> showIt 
"SELECT 1 / 2 / 3 as age"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.