Update edit data for result set streaming changes (#3634)

This commit is contained in:
Matt Irvine
2018-12-18 11:07:26 -08:00
committed by GitHub
parent 50e2251e74
commit 7f950ddb80
2 changed files with 10 additions and 1 deletions

View File

@@ -343,6 +343,9 @@ export class EditDataComponent extends GridParentComponent implements OnInit, On
handleResultSet(self: EditDataComponent, event: any): void {
// Clone the data before altering it to avoid impacting other subscribers
let resultSet = Object.assign({}, event.data);
if (!resultSet.complete) {
return;
}
// Add an extra 'new row'
resultSet.rowCount++;

View File

@@ -387,8 +387,14 @@ export class QueryModelService implements IQueryModelService {
// We do not have a query runner for this editor, so create a new one
// and map it to the results uri
queryRunner = this._instantiationService.createInstance(QueryRunner, ownerUri);
const resultSetEventType = '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 => {
let link = undefined;