mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-27 09:35:37 -05:00
Query Management log message update (#23395)
This commit is contained in:
@@ -124,7 +124,7 @@ export class QueryManagementService implements IQueryManagementService {
|
||||
constructor(
|
||||
@IConnectionManagementService private _connectionService: IConnectionManagementService,
|
||||
@IAdsTelemetryService private _telemetryService: IAdsTelemetryService,
|
||||
@ILogService private _logService: ILogService,
|
||||
@ILogService private _logService: ILogService
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -278,9 +278,10 @@ export class QueryManagementService implements IQueryManagementService {
|
||||
const result = [];
|
||||
let start = rowData.rowsStartIndex;
|
||||
this._logService.trace(`Getting ${rowData.rowsCount} rows starting from index: ${rowData.rowsStartIndex}.`);
|
||||
let pageIdx = 1;
|
||||
do {
|
||||
const rowCount = Math.min(pageSize, rowData.rowsStartIndex + rowData.rowsCount - start);
|
||||
this._logService.trace(`Paged Fetch - Getting ${rowCount} rows starting from index: ${start}.`);
|
||||
this._logService.trace(`Page ${pageIdx} - Getting ${rowCount} rows starting from index: ${start}.`);
|
||||
const rowSet = await runner.getQueryRows({
|
||||
ownerUri: rowData.ownerUri,
|
||||
batchIndex: rowData.batchIndex,
|
||||
@@ -288,9 +289,10 @@ export class QueryManagementService implements IQueryManagementService {
|
||||
rowsCount: rowCount,
|
||||
rowsStartIndex: start
|
||||
});
|
||||
this._logService.trace(`Paged Fetch - Received ${rowSet.resultSubset.rows} rows starting from index: ${start}.`);
|
||||
this._logService.trace(`Page ${pageIdx} - Received ${rowSet.resultSubset.rows.length} rows starting from index: ${start}.`);
|
||||
result.push(...rowSet.resultSubset.rows);
|
||||
start += rowCount;
|
||||
pageIdx++;
|
||||
if (onProgressCallback) {
|
||||
onProgressCallback(start - rowData.rowsStartIndex);
|
||||
}
|
||||
|
||||
@@ -60,8 +60,8 @@ export class QueryEditorService implements IQueryEditorService {
|
||||
const mode = this._connectionManagementService.getProviderLanguageMode(connectionProviderName);
|
||||
const fileInput = await this._editorService.createEditorInput({ forceUntitled: true, resource: docUri, languageId: mode }) as UntitledTextEditorInput;
|
||||
let untitledEditorModel = await fileInput.resolve();
|
||||
if (options.initalContent) {
|
||||
untitledEditorModel.textEditorModel.setValue(options.initalContent);
|
||||
if (options.initialContent) {
|
||||
untitledEditorModel.textEditorModel.setValue(options.initialContent);
|
||||
if (options.dirty === false || (options.dirty === undefined && !this._configurationService.getValue<IQueryEditorConfiguration>('queryEditor').promptToSaveGeneratedFiles)) {
|
||||
(untitledEditorModel as UntitledTextEditorModel).setDirty(false);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ export interface IQueryEditorOptions extends IEditorOptions {
|
||||
export const IQueryEditorService = createDecorator<IQueryEditorService>('QueryEditorService');
|
||||
|
||||
export interface INewSqlEditorOptions {
|
||||
initalContent?: string;
|
||||
initialContent?: string;
|
||||
/**
|
||||
* Defaults based on user configuration
|
||||
*/
|
||||
|
||||
@@ -119,7 +119,7 @@ export class TableDesignerComponentInput implements DesignerComponentInput {
|
||||
try {
|
||||
this.updateState(this.valid, this.dirty, 'generateScript');
|
||||
const script = await this._provider.generateScript(this.tableInfo);
|
||||
this._queryEditorService.newSqlEditor({ initalContent: script });
|
||||
this._queryEditorService.newSqlEditor({ initialContent: script });
|
||||
this.updateState(this.valid, this.dirty);
|
||||
notificationHandle.updateMessage(localize('tableDesigner.generatingScriptCompleted', "Script generated."));
|
||||
generateScriptEvent.withAdditionalMeasurements({
|
||||
|
||||
@@ -213,7 +213,7 @@ export class TaskService implements ITaskService {
|
||||
if ((task.status === TaskStatus.Succeeded || task.status === TaskStatus.SucceededWithWarning)
|
||||
&& eventArgs.script && eventArgs.script !== '') {
|
||||
if (task.taskExecutionMode === TaskExecutionMode.script) {
|
||||
this.queryEditorService.newSqlEditor({ initalContent: eventArgs.script });
|
||||
this.queryEditorService.newSqlEditor({ initialContent: eventArgs.script });
|
||||
} else if (task.taskExecutionMode === TaskExecutionMode.executeAndScript) {
|
||||
task.script = eventArgs.script;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user