This repository has been archived by the owner on Feb 21, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1632 #1677
Fixes #1632 #1677
Changes from 5 commits
efed5ea
a028d46
bd48db1
b698193
b617db8
37d1cfb
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I definitely like the idea of cleaning this up, but let's make it a switch statement instead of a map lookup:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yuce I just merged #1679 which actually implements this
switch
, so you can just rebase master for the update, and add in"SetColumnAttrs"
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if this works for the case where
ID
is actually supposed to be0
(with no column key). Should we open a ticket to write a custom JSON marshaler?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we try to remove
ID
from the result in the first place ?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, we omit the key when it doesn't apply, so it seems to make sense to omit the ID when it doesn't apply. And when there is a key, the ID is always
0
, so it's not really useful anyway. I don't have a strong opinion on this, however. I'll make a ticket suggesting we revisit that output and it can be discussed there.