Repository navigation
Feature/csv header source - #601
Merged
buzzia2001 merged 4 commits intoNov 25, 2026
Merged
Conversation
Member
|
@benetti-marco There was some refactoring done in #595 which caused some conflicts with this PR. Can you update this PR accordingly? |
Contributor
Author
|
Sure. I'll do it next week. |
Contributor
Author
done! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add setting to choose CSV header source (column name or label)
When a result set is exported as CSV (
csv:prefix), the header row always contains the column names. This PR adds a setting to use the column labels (headings) instead.Changes
vscode-db2i.codegen.csvHeaderSource(under Code generation):Name(default): uses the column name, same as the current behaviourLabel: uses the column labelsrc/views/results/index.tsuses the setting. If a column has an empty label, its name is used instead, so no header is ever blank.Notes
rpgSymbolicNameSource). The setting description says so.LABEL ON COLUMN), the system returns the column name as its label, so the header shows the name.csv.stringify. In that case the header row still uses column names, because labels aren't available there. A comment in the code explains this.How to test
Code generation › Csv Header SourcetoLabel.csv: select * from <table with column headings>and check that the header row contains the labels.label on column <lib>.<table> (<col> is 'Customer Code');The header should show
"Customer Code".Nameand check that the output is unchanged from before.