Skip to content

Conversation

@quetz
Copy link

@quetz quetz commented Feb 4, 2019

No description provided.

Copy link

@qnikst qnikst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice work! Some minor comments though.

decoder = PD.dataRowHeader *> PD.getNonNullable fd
r <- run $ do
sendBatchAndSync c [q]
-- msgs <- collectUntilReadyForQuery c
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

redundant line

_ <- getByteString len
pure DataRow
bs <- getByteString len
pure $ DataRow bs
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pure $! DataRow bs

strictness analyzer will likely do this on it's own, but it's safer to be sure.

countDataRows :: DataRows -> Word
countDataRows = foldlDataRows (\acc (DataChunk c _) -> acc + c) 0
countDataRows :: [B.ByteString] -> Int
countDataRows = length
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that the logic changed there, are we guaranteed that there is one row per list element?

@quetz quetz closed this Feb 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants