where
q u' = proc () -> do
(n,usrs) <- join' -< ()
- restrict -< user_username usrs .== (toNullable $ pgStrictText u')
- restrict -< _node_typename n .== (pgInt4 $ toDBid nt)
+ restrict -< user_username usrs .== (toNullable $ sqlStrictText u')
+ restrict -< _node_typename n .== (sqlInt4 $ toDBid nt)
returnA -< _node_id n
join' :: Query (NodeRead, UserReadNull)
join' = leftJoin queryNodeTable queryUserTable on1
where
- on1 (n,us) = _node_userId n .== user_id us
+ on1 (n,us) = _node_user_id n .== user_id us