11986
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
{
boards_packs: [
{
latest_thread_post: {
thread_id: 1,
modified_by: null,
body: {
data: "latest?",
schema: "post_data_request",
type: "post_data_bbcode",
v: 1
},
modified_at: "2016-04-04T07:52:34.059885000000Z",
schema: "thread_post_response",
created_by: 1,
created_at: "2016-04-04T07:52:34.059885000000Z",
id: 19878,
title: null,
user_id: 1,
v: 1,
parent_id: null
},
latest_thread_post_user: {
email_md5: "b2eff1bf71b3445e307ec91e4018d24c",
nick: "andrewdarqui",
schema: "user_sanitized_response",
display_nick: "andrewdarqui",
created_at: "2016-04-04T07:30:33.174801000000Z",
id: 1,
v: 1,
is_active: false
},
schema: "board_pack_response",
board_stat: {
views: 0,
schema: "board_stat_response",
thread_posts: 11,
threads: 5,
board_id: 1,
v: 1
},
board: {
modified_by: null,
modified_at: null,
schema: "board_response",
forum_id: 1,
created_by: 1,
name: "board",
created_at: "2016-01-19T02:43:08.357499000000Z",
id: 1,
v: 1,
parent_id: null,
desc: "board desc"
},
latest_thread: {
sticky: false,
locked: false,
modified_by: null,
modified_at: "2016-04-02T21:36:22.870992000000Z",
schema: "thread_response",
created_by: 1,
poll: null,
name: "Test Thread",
activity_at: "2016-04-04T07:52:34.059885000000Z",
created_at: "2016-01-19T20:19:58.389153000000Z",
id: 1,
board_id: 1,
v: 1,
desc: "A thread for testing"
},
v: 1
}
],
schema: "boards_packs_responses",
v: 1
}
146?!
That's lighter than my highschool days. I weighed 67 kg back then. 144 = 66 kg. The least I've ever weighed was 64 kg when I was 21, due to eating 1 per day off ~5$ per day, me and my mom. So I was living with 2.5$ per day for food then.

did you figure out what was wrong with that piece of code?

So this is how my life is going to look.
q :: forall site.
(YesodPersist site, YesodPersistBackend site ~ SqlBackend) =>
Key Board -> HandlerT site IO [(Value Int64, Value Int64, Value Int64)]
q board_id = do
runDB
$ select
$ from $ \(thread_post `E.LeftOuterJoin` thread `E.LeftOuterJoin` board) -> do
on $ thread ^. ThreadBoardId ==. board ^. BoardId
on $ thread_post ^. ThreadPostThreadId ==. thread ^. ThreadId
where_ $ board ^. BoardId ==. val board_id
return (countDistinct $ board ^. BoardId, countDistinct $ thread ^. ThreadId, countDistinct $ thread_post ^. ThreadPostId)
q4 :: forall site.
(YesodPersist site, YesodPersistBackend site ~ SqlBackend) =>
Key Board -> HandlerT site IO [(E.Value Int64, E.Value Int64, E.Value Int64)]
q4 board_id = do
runDB
$ E.select
$ E.from $ \((thread_post :: E.SqlExpr (Entity ThreadPost)) `E.LeftOuterJoin` (thread :: E.SqlExpr (Entity
Thread)) `E.LeftOuterJoin` (board :: E.SqlExpr (Entity Board))) -> do
E.on $ thread ^. ThreadBoardId E.==. board ^. BoardId
E.on $ thread_post ^. ThreadPostThreadId E.==. thread ^. ThreadId
E.where_ $
board ^. BoardId E.==. E.val board_id
return (E.countDistinct $ board ^. BoardId, E.countDistinct $ thread ^. ThreadId, E.countDistinct $
thread_post ^. ThreadPostId)I always wondered - do you do that with a phone with the GPS turned on in one of your pockets or how?



