[Expressions] Update expressions public API to expose partial results support (#102403) (#104210)

* Add partial result flag to the execution result
* Update expressions plugin run method to return observable
* Update data getter in the execution contract to return observable
* Update the expression loader to take into account the partial results flag
This commit is contained in:
Michael Dokolin 2021-07-02 00:57:17 +02:00 committed by GitHub
parent e601457bba
commit c73e13d744
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
43 changed files with 370 additions and 281 deletions

View file

@ -13,7 +13,7 @@ import { Observable } from 'rxjs';
import { ExecutorState, ExecutorContainer } from './container';
import { createExecutorContainer } from './container';
import { AnyExpressionFunctionDefinition, ExpressionFunction } from '../expression_functions';
import { Execution, ExecutionParams } from '../execution/execution';
import { Execution, ExecutionParams, ExecutionResult } from '../execution/execution';
import { IRegistry } from '../types';
import { ExpressionType } from '../expression_types/expression_type';
import { AnyExpressionTypeDefinition } from '../expression_types/types';
@ -160,7 +160,7 @@ export class Executor<Context extends Record<string, unknown> = Record<string, u
ast: string | ExpressionAstExpression,
input: Input,
params: ExpressionExecutionParams = {}
): Observable<Output | ExpressionValueError> {
): Observable<ExecutionResult<Output | ExpressionValueError>> {
return this.createExecution<Input, Output>(ast, params).start(input);
}