UNPKG

@finos/legend-graph

Version:
101 lines 3.3 kB
/** * Copyright (c) 2020-present, Goldman Sachs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ export declare enum BuilderType { CLASS_BUILDER = "classBuilder", TDS_BUILDER = "tdsBuilder", JSON_BUILDER = "json" } export declare enum ExecutionActivityType { RELATIONAL = "relational", RELATIONAL_EXECUTION_ACTIVITY = "RelationalExecutionActivity", AGGREGATION_AWARE_ACTIVITY = "aggregationAware" } export declare enum EXECUTION_SERIALIZATION_FORMAT { CSV = "CSV" } export declare class ResultBuilder { _type: BuilderType; constructor(type: BuilderType); } export declare abstract class ExecutionActivities { } export declare class RelationalExecutionActivities extends ExecutionActivities { sql: string; comment?: string | undefined; constructor(sql: string); } export declare class AggregationAwareActivities extends ExecutionActivities { rewrittenQuery: string; } export declare class UnknownExecutionActivities extends ExecutionActivities { values: object; constructor(content: object); } export declare abstract class ExecutionResult { builder: ResultBuilder; activities: ExecutionActivities[] | undefined; } export type ExecutionResultWithMetadata = { executionResult: ExecutionResult; executionTraceId?: string; }; export declare class JsonBuilder { _type: BuilderType; } export declare class JsonExecutionResult extends ExecutionResult { values: object; } export declare class RawExecutionResult extends ExecutionResult { value: string | number | boolean | null; constructor(content: string | number | boolean | null); } /** * TODO?: maybe we converge to use TDSColumn * * Since here, we're building out the result builder config, we don't need * to fully resolve all the references, hence we have this simplified version of TDSColumn */ export declare class INTERNAL__TDSColumn { name: string; type?: string | undefined; relationalType?: string | undefined; doc?: string | undefined; } export declare class TDSBuilder extends ResultBuilder { columns: INTERNAL__TDSColumn[]; constructor(); } export declare class TDSRow { values: (string | number | boolean | null)[]; } export declare class TabularDataSet { columns: string[]; rows: TDSRow[]; } export declare class TDSExecutionResult extends ExecutionResult { readonly _UUID: string; builder: TDSBuilder; result: TabularDataSet; } export declare class ClassBuilder extends ResultBuilder { _type: BuilderType; } export declare class ClassExecutionResult extends ExecutionResult { builder: ClassBuilder; objects: object; } export declare const getTDSRowRankByColumnInAsc: (a: TDSRow, b: TDSRow, colIndex: number) => number; //# sourceMappingURL=ExecutionResult.d.ts.map