Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UserInfo
- fullName Text
- ageBracket Text Maybe
- gender Text
- createdOn UTCTime default=now()
- updatedOn UTCTime Maybe
- deriving Show
- User
- userInfoId UserInfoId
- username Text
- password Text
- UniqueUsername username
- deriving Show
- -- let say the output of this
- -- userInfoId = 1 -- this is a
- -- username = admin
- -- paswword = admin
- userData <- runDB $ selectFirst [UserUsername ==. uname , UsersPassword ==. pword] [LimitTo 1]
- case userData of
- Nothing -> ....
- Just (Entity _ u) -> do
- let userInfoId = T.pack (show (userUserInfoId u))
- $(logInfo) userInfoId
- .....
- [INFO] UserInfoKey {unUserInfoKey = SqlBackendKey {unSqlBackendKey = 1}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement