Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update JSON, YAML, & SQLite parsers to track table comments; fix YAML & JSON producers' table comments #65

Closed
wants to merge 4 commits into from

Conversation

djerius
Copy link
Contributor

@djerius djerius commented Aug 4, 2015

The SQLite, YAML & JSON parsers (trivially) didn't track table comments. I've added that.

The YAML and JSON producers should have output comments as arrays; for table and field comments, they could croak or generate incorrect output if there was an even number of comments. For procedures, the comments were output as a concatenated string instead of an array.

Both the JSON and YAML producers called the Table and Field comments
method in list context while constructing a hash, assuming they would
return a single value. They don't. In list context the comments
methods return a list of comments.  This led to "odd
number of hash element" errors if the comments method returned an even
number of elements.

In scalar context the comments methods return a string composed of the
concatenation of comments.  This context was explicitly used when
producing procedure comments.

However, since the JSON and YAML formats support arrays, their
producers should output the comments as arrays to avoid loss of
information.

To that end, all comments output are now encoded as arrays.
@rabbiveesh
Copy link
Contributor

Cleaning up here, this is already implemented in master

@rabbiveesh rabbiveesh closed this Jul 7, 2022
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.

None yet

2 participants