mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Enable custom delimiters when saving as CSV (#1928)
* Support custom delimiters for csv * Run tsfmt
This commit is contained in:
@@ -275,6 +275,11 @@ let registryProperties = {
|
||||
'description': localize('sql.saveAsCsv.includeHeaders', '[Optional] When true, column headers are included when saving results as CSV'),
|
||||
'default': true
|
||||
},
|
||||
'sql.saveAsCsv.delimiter': {
|
||||
'type': 'string',
|
||||
'description': localize('sql.saveAsCsv.delimiter', '[Optional] The custom delimiter to use between values when saving as CSV'),
|
||||
'default': ','
|
||||
},
|
||||
'sql.copyIncludeHeaders': {
|
||||
'type': 'boolean',
|
||||
'description': localize('sql.copyIncludeHeaders', '[Optional] Configuration options for copying results from the Results View'),
|
||||
|
||||
@@ -186,7 +186,11 @@ export class ResultSerializer {
|
||||
if (saveConfig.includeHeaders !== undefined) {
|
||||
saveResultsParams.includeHeaders = saveConfig.includeHeaders;
|
||||
}
|
||||
if (saveConfig.delimiter !== undefined) {
|
||||
saveResultsParams.delimiter = saveConfig.delimiter;
|
||||
}
|
||||
}
|
||||
|
||||
return saveResultsParams;
|
||||
}
|
||||
|
||||
@@ -202,6 +206,7 @@ export class ResultSerializer {
|
||||
// and we want to have just 1 setting that lists this.
|
||||
let config = this.getConfigForCsv();
|
||||
config.resultFormat = SaveFormat.EXCEL;
|
||||
config.delimiter = undefined;
|
||||
return config;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user