diff --git a/src/sql/parts/query/common/query.contribution.ts b/src/sql/parts/query/common/query.contribution.ts index 52485bfe27..f1ac06cf39 100644 --- a/src/sql/parts/query/common/query.contribution.ts +++ b/src/sql/parts/query/common/query.contribution.ts @@ -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'), diff --git a/src/sql/parts/query/common/resultSerializer.ts b/src/sql/parts/query/common/resultSerializer.ts index efb6ce626c..a59033bc3a 100644 --- a/src/sql/parts/query/common/resultSerializer.ts +++ b/src/sql/parts/query/common/resultSerializer.ts @@ -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; } diff --git a/src/sql/sqlops.d.ts b/src/sql/sqlops.d.ts index e5ffb1fb31..1cc9ddd1a3 100644 --- a/src/sql/sqlops.d.ts +++ b/src/sql/sqlops.d.ts @@ -840,6 +840,7 @@ declare module 'sqlops' { columnStartIndex: number; columnEndIndex: number; includeHeaders?: boolean; + delimiter?: string; } export interface SaveResultRequestResult { @@ -1187,7 +1188,7 @@ declare module 'sqlops' { } export enum FrequencyTypes { - Unknown , + Unknown, OneTime = 1 << 1, Daily = 1 << 2, Weekly = 1 << 3, @@ -1395,15 +1396,14 @@ declare module 'sqlops' { job: AgentJobInfo; } - export interface AgentJobCategory - { + export interface AgentJobCategory { id: string; name: string; } export interface AgentJobDefaultsResult extends ResultStatus { owner: string; - categories: AgentJobCategory[]; + categories: AgentJobCategory[]; } export interface CreateAgentJobStepResult extends ResultStatus {