mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Update edit data for result set streaming changes (#3634)
This commit is contained in:
@@ -343,6 +343,9 @@ export class EditDataComponent extends GridParentComponent implements OnInit, On
|
|||||||
handleResultSet(self: EditDataComponent, event: any): void {
|
handleResultSet(self: EditDataComponent, event: any): void {
|
||||||
// Clone the data before altering it to avoid impacting other subscribers
|
// Clone the data before altering it to avoid impacting other subscribers
|
||||||
let resultSet = Object.assign({}, event.data);
|
let resultSet = Object.assign({}, event.data);
|
||||||
|
if (!resultSet.complete) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Add an extra 'new row'
|
// Add an extra 'new row'
|
||||||
resultSet.rowCount++;
|
resultSet.rowCount++;
|
||||||
|
|||||||
@@ -387,8 +387,14 @@ export class QueryModelService implements IQueryModelService {
|
|||||||
// We do not have a query runner for this editor, so create a new one
|
// We do not have a query runner for this editor, so create a new one
|
||||||
// and map it to the results uri
|
// and map it to the results uri
|
||||||
queryRunner = this._instantiationService.createInstance(QueryRunner, ownerUri);
|
queryRunner = this._instantiationService.createInstance(QueryRunner, ownerUri);
|
||||||
|
const resultSetEventType = 'resultSet';
|
||||||
queryRunner.addListener(QREvents.RESULT_SET, resultSet => {
|
queryRunner.addListener(QREvents.RESULT_SET, resultSet => {
|
||||||
this._fireQueryEvent(ownerUri, 'resultSet', resultSet);
|
this._fireQueryEvent(ownerUri, resultSetEventType, resultSet);
|
||||||
|
});
|
||||||
|
queryRunner.onResultSetUpdate(resultSetSummaries => {
|
||||||
|
resultSetSummaries.forEach(resultSet => {
|
||||||
|
this._fireQueryEvent(ownerUri, resultSetEventType, resultSet);
|
||||||
|
})
|
||||||
});
|
});
|
||||||
queryRunner.addListener(QREvents.BATCH_START, batch => {
|
queryRunner.addListener(QREvents.BATCH_START, batch => {
|
||||||
let link = undefined;
|
let link = undefined;
|
||||||
|
|||||||
Reference in New Issue
Block a user