File tree Expand file tree Collapse file tree 3 files changed +42
-4
lines changed Expand file tree Collapse file tree 3 files changed +42
-4
lines changed Original file line number Diff line number Diff line change 152
152
" Use the column name" ,
153
153
" Use the column label\n 'Extended metadata' must be set to true in the JDBC configuration"
154
154
]
155
+ },
156
+ "vscode-db2i.codegen.csvColumnDelimiter" : {
157
+ "type" : " string" ,
158
+ "description" : " Delimiter" ,
159
+ "default" : " Comma" ,
160
+ "enum" : [
161
+ " Comma" ,
162
+ " Semicolon" ,
163
+ " Tab"
164
+ ]
155
165
}
156
166
}
157
167
},
Original file line number Diff line number Diff line change 43
43
" Use the column name" ,
44
44
" Use the column label\n 'Extended metadata' must be set to true in the JDBC configuration"
45
45
]
46
+ },
47
+ "vscode-db2i.codegen.csvColumnDelimiter" : {
48
+ "type" : " string" ,
49
+ "description" : " Delimiter" ,
50
+ "default" : " Comma" ,
51
+ "enum" : [
52
+ " Comma" ,
53
+ " Semicolon" ,
54
+ " Tab"
55
+ ]
46
56
}
47
57
}
48
58
}
Original file line number Diff line number Diff line change @@ -414,10 +414,28 @@ async function runHandler(options?: StatementInfo) {
414
414
case `sql` :
415
415
let content = `` ;
416
416
switch ( statementDetail . qualifier ) {
417
- case `csv` : content = csv . stringify ( data , {
418
- header : true ,
419
- quoted_string : true ,
420
- } ) ; break ;
417
+ case `csv` :
418
+ let delimiter ;
419
+ switch ( Configuration . get ( `codegen.csvColumnDelimiter` ) ) {
420
+ case `Comma` :
421
+ delimiter = `,` ;
422
+ break ;
423
+ case `Semicolon` :
424
+ delimiter = `;` ;
425
+ break ;
426
+ case `Tab` :
427
+ delimiter = `\t` ;
428
+ break ;
429
+ default :
430
+ delimiter = `,` ;
431
+ break ;
432
+ }
433
+ content = csv . stringify ( data , {
434
+ header : true ,
435
+ quoted_string : true ,
436
+ delimiter : delimiter
437
+ } ) ;
438
+ break ;
421
439
case `json` : content = JSON . stringify ( data , null , 2 ) ; break ;
422
440
423
441
case `sql` :
You can’t perform that action at this time.
0 commit comments