UNPKG

@adaptabletools/adaptable

Version:

Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements

55 lines (54 loc) 3.27 kB
import { IRowNode } from 'ag-grid-enterprise'; import { Observable } from 'rxjs'; import { AdaptableApi, RowDataChangedInfo } from '../../../types'; import { GlobalExpressionFunctionsContext } from '../../AdaptableOptions/ExpressionOptions'; import { ExpressionFunction } from '../../parser/src/types'; import { CellDataChangedInfo } from '../../AdaptableState/Common/CellDataChangedInfo'; import { AdaptableModule } from '../../AdaptableState/Common/Types'; import { BooleanAggregationParameter } from '../ExpressionFunctions/aggregatedBooleanExpressionFunctions'; import { ScalarAggregationParameter } from '../ExpressionFunctions/aggregatedScalarExpressionFunctions'; import { IQueryLanguageService, ModuleExpressionFunctionsMap } from './Interface/IQueryLanguageService'; export declare class QueryLanguageService implements IQueryLanguageService { private adaptableApi; private cacheBooleanValidation; private cacheObservableValidation; private cacheAggregatedBooleanValidation; private cacheAggregatedScalarValidation; private cacheModuleSpecificExpressionFunctions; constructor(adaptableApi: AdaptableApi); evaluateBooleanExpression(expression: string, module: AdaptableModule, rowNode: any, dataChangedEvent?: CellDataChangedInfo): any; evaluateScalarExpression(expression: string, module: AdaptableModule, rowNode: IRowNode): any; evaluateAggregatedScalarExpression(expression: string, module: AdaptableModule, getRowNodes?: () => IRowNode[]): ScalarAggregationParameter; evaluateObservableExpression(reactiveExpression: string, module: AdaptableModule): Observable<CellDataChangedInfo | RowDataChangedInfo>; evaluateAggregatedBooleanExpression(aggregationExpression: string, module: AdaptableModule): BooleanAggregationParameter; validateBoolean(expressionInput: string, module: AdaptableModule, config?: { force?: boolean; }): { isValid: boolean; errorMessage: string; }; validateObservable(expressionInput: string, module: AdaptableModule): { isValid: boolean; errorMessage: string; }; validateAggregatedBoolean(expressionInput: string, module: AdaptableModule): { isValid: boolean; errorMessage: string; }; validateAggregatedScalar(expressionInput: string, module: AdaptableModule): { isValid: boolean; errorMessage: string; }; computeAggregatedBooleanValue(expression: string, module: AdaptableModule): boolean; getColumnsFromExpression(input?: string): string[]; getNamedQueryNamesFromExpression(input?: string): string[]; getExpressionWithColumnFriendlyNames(expression?: string): string; getModuleExpressionFunctionsMap(module: AdaptableModule): ModuleExpressionFunctionsMap; getCustomAggregatedScalarFunctions(): Record<string, ExpressionFunction> | ((context: GlobalExpressionFunctionsContext<string>) => Record<string, ExpressionFunction>); private mapCustomAggregatedScalarFunctionsToInternal; private extractMappedExpressionFunctions; evaluateCustomQueryVariable(functionName: string, args?: any[]): any; private getBooleanAndScalarFunctions; private getExpressionCacheKey; getNodesFromExpression(input: string, nodeType: string): string[]; }