@finos/legend-graph
Version:
Legend graph and graph manager
112 lines • 4.15 kB
TypeScript
/**
* 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.
*/
import { type Hashable } from '@finos/legend-shared';
import type { GroupByMapping } from '../mapping/GroupByMapping.js';
import type { FilterMapping } from '../mapping/FilterMapping.js';
import type { JoinReference } from './JoinReference.js';
import type { TableReference } from './TableReference.js';
import type { ViewReference } from './ViewReference.js';
import type { ColumnReference } from './ColumnReference.js';
import type { Database } from './Database.js';
import type { StereotypeReference } from '../../../domain/StereotypeReference.js';
import type { TaggedValue } from '../../../domain/TaggedValue.js';
export declare abstract class RelationalOperationElement {
abstract get hashCode(): string;
stereotypes: StereotypeReference[];
taggedValues: TaggedValue[];
}
export declare abstract class Relation extends RelationalOperationElement {
columns: RelationalOperationElement[];
get hashCode(): string;
}
export declare abstract class NamedRelation extends Relation {
name: string;
constructor(name: string);
}
declare abstract class Function extends RelationalOperationElement {
}
export declare abstract class Operation extends Function {
}
export declare class DynaFunction extends Operation {
name: string;
parameters: RelationalOperationElement[];
constructor(name: string);
get hashCode(): string;
}
export interface RelationalMappingSpecification {
filter?: FilterMapping | undefined;
distinct?: boolean | undefined;
groupBy?: GroupByMapping | undefined;
mainTableAlias?: TableAlias | undefined;
}
export declare enum JoinType {
INNER = "INNER",
LEFT_OUTER = "LEFT_OUTER",
RIGHT_OUTER = "RIGHT_OUTER",
OUTER = "OUTER"
}
export declare class JoinTreeNode {
/**
* This field is required in PURE
*
* @discrepancy model
*/
alias?: TableAlias | undefined;
children: JoinTreeNode[];
join: JoinReference;
/**
* For convenience, we use a Typescript enum instead of the native
* Pure enumeration meta::relational::metamodel::join::JoinType
*
* @discrepancy model
*/
joinType?: JoinType | undefined;
constructor(join: JoinReference, joinType?: JoinType, alias?: TableAlias);
get hashCode(): string;
}
/**
* We could potentially include logic to throw error if tree structure is detected
*/
export declare const extractLine: (joinTreeNode: JoinTreeNode) => JoinTreeNode[];
export declare class RelationalOperationElementWithJoin extends RelationalOperationElement {
relationalOperationElement?: RelationalOperationElement | undefined;
joinTreeNode?: JoinTreeNode | undefined;
get hashCode(): string;
}
export declare class TableAlias extends RelationalOperationElement implements Hashable {
relation: TableReference | ViewReference;
name: string;
database?: Database | undefined;
isSelfJoinTarget: boolean;
get hashCode(): string;
}
export declare class TableAliasColumn extends RelationalOperationElement {
alias: TableAlias;
column: ColumnReference;
columnName?: string | undefined;
get hashCode(): string;
}
export declare class Literal extends RelationalOperationElement {
value: string | number | RelationalOperationElement;
constructor(value: string | number | RelationalOperationElement);
get hashCode(): string;
}
export declare class LiteralList extends RelationalOperationElement {
values: Literal[];
get hashCode(): string;
}
export {};
//# sourceMappingURL=RelationalOperationElement.d.ts.map