@elyx-code/project-logic-tree 0.0.6884 → 0.0.6885

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/dist/index.cjs +235 -235
  2. package/dist/index.d.ts +61 -13
  3. package/dist/index.js +49012 -48718
  4. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -10794,12 +10794,14 @@ export declare enum BaseValueDescriptorIds {
10794
10794
  entity: DefinitionEntityState | null;
10795
10795
  query: NestedSearchStatement | null;
10796
10796
  aggregation: AggregationStatement | null;
10797
+ functionCall: FunctionCall | null;
10797
10798
  sourceType: DataSourceType | null;
10799
+ private _asFallback;
10798
10800
  constructor(owner: SearchStatementState);
10799
10801
  get id(): string;
10800
10802
  get type(): SearchStatementNodeType.DataSource;
10801
10803
  get isValid(): boolean;
10802
- get source(): DefinitionEntityState | NestedSearchStatement | AggregationStatement | null;
10804
+ get source(): DefinitionEntityState | NestedSearchStatement | AggregationStatement | FunctionCall | null;
10803
10805
  set as(as: string);
10804
10806
  get as(): string;
10805
10807
  get columns(): ColumnRef[];
@@ -10813,7 +10815,8 @@ export declare enum BaseValueDescriptorIds {
10813
10815
  declare enum DataSourceType {
10814
10816
  Table = "table",
10815
10817
  Query = "query",
10816
- Aggregation = "aggregation"
10818
+ Aggregation = "aggregation",
10819
+ Function = "function"
10817
10820
  }
10818
10821
 
10819
10822
  export declare function dataTypeCompatibilityToErrorExplanation(entityWithValueA: EntityWithValueState, entityWithValueB: EntityWithValueState, compatibility: IDataTypeCompatible | IDataTypeIncompatibile): string;
@@ -14810,7 +14813,7 @@ export declare enum BaseValueDescriptorIds {
14810
14813
 
14811
14814
  export declare const fromNowWithoutSuffixDataTypeParentRef: IValueDescriptorReference;
14812
14815
 
14813
- declare function fromOrderByClauseToSortStatements(orderByClause: OrderByClause, _selectStatement: SelectStmt, _allColumns: IColumnMapping[], state: SearchStatementState): SortStatement[];
14816
+ declare function fromOrderByClauseToSortStatements(orderByClause: OrderByClause, _selectStatement: SelectStmt, _allColumns: IColumnMapping[], state: SearchStatementState, project: ProjectState): SortStatement[];
14814
14817
 
14815
14818
  export declare function fromPublishingDisabledCodeToReadable(code: PUBLISHING_DISABLED_REASONS): string;
14816
14819
 
@@ -14849,19 +14852,22 @@ export declare enum BaseValueDescriptorIds {
14849
14852
 
14850
14853
  declare class FunctionCall implements ISearchNode {
14851
14854
  owner: SearchStatementState;
14852
- functionName: string;
14855
+ private _functionName;
14853
14856
  category: SQLFunctionCategory;
14854
14857
  arguments: FunctionArgument[];
14855
14858
  parent: DataSource | null;
14856
14859
  _id: string;
14857
14860
  _as: string | null;
14858
14861
  constructor(owner: SearchStatementState);
14862
+ set functionName(name: FunctionNames);
14863
+ get functionName(): FunctionNames | '';
14859
14864
  set as(as: string);
14860
14865
  get as(): string;
14861
14866
  get type(): SearchStatementNodeType.FunctionCall;
14862
14867
  get id(): string;
14863
14868
  get isValid(): boolean;
14864
14869
  toQuery(): string;
14870
+ hasFunctionOfCategory(category: SQLFunctionCategory): boolean;
14865
14871
  }
14866
14872
 
14867
14873
  export declare enum FunctionCallDependencyField {
@@ -15226,6 +15232,25 @@ export declare enum BaseValueDescriptorIds {
15226
15232
  }
15227
15233
  export { functionDeclarationValidation }
15228
15234
 
15235
+ declare enum FunctionNames {
15236
+ Upper = "UPPER",
15237
+ Lower = "LOWER",
15238
+ Max = "MAX",
15239
+ Min = "MIN",
15240
+ JsonBuildObject = "json_build_object",
15241
+ RowToJson = "row_to_json",
15242
+ JsonAgg = "json_agg",
15243
+ Count = "COUNT",
15244
+ GenerateSeries = "generate_series",
15245
+ Unnest = "unnest",
15246
+ Coalesce = "COALESCE",
15247
+ Concat = "CONCAT",
15248
+ Sum = "SUM",
15249
+ Length = "LENGTH",
15250
+ Round = "ROUND",
15251
+ Now = "NOW"
15252
+ }
15253
+
15229
15254
  export declare const gdriveSmartFetchActionDescriptorTransfer: IActionDescriptorTransfer;
15230
15255
 
15231
15256
  /** 0) connection (asType external connection entity) */
@@ -19013,18 +19038,30 @@ export declare enum BaseValueDescriptorIds {
19013
19038
  type: 'query';
19014
19039
  subquery: SelectStmt;
19015
19040
  as: string;
19041
+ } | {
19042
+ type: 'function';
19043
+ functionCall: Expr;
19044
+ as: string;
19016
19045
  } | null;
19017
19046
 
19018
19047
  declare function getMainSourceNameFromFromClauseExpr(fromExpr: JoinExpr | PivotExpr | UnpivotExpr | TablesampleExpr | ForSystemTimeAsOfExpr | TableFactor, parentExpr?: JoinExpr): {
19019
19048
  type: 'table';
19020
19049
  name: string;
19021
19050
  as: string;
19051
+ } | {
19052
+ type: 'function';
19053
+ functionCall: Expr;
19054
+ as: string;
19022
19055
  } | null;
19023
19056
 
19024
19057
  declare function getMainSourceNameFromSelectStatement(selectStatement: SelectStmt): {
19025
19058
  type: 'table';
19026
19059
  name: string;
19027
19060
  as: string;
19061
+ } | {
19062
+ type: 'function';
19063
+ functionCall: Expr;
19064
+ as: string;
19028
19065
  } | null;
19029
19066
 
19030
19067
  export declare function getMillisecond(input: ISODateString): number;
@@ -31856,7 +31893,7 @@ export declare enum BaseValueDescriptorIds {
31856
31893
 
31857
31894
  declare function sanitizeQuery(query: string): string;
31858
31895
 
31859
- declare function sanitizeSQLIdentifierText(text: string): string;
31896
+ declare function sanitizeSQLIdentifierText(text: string): FunctionNames;
31860
31897
 
31861
31898
  export declare type ScopeCompatibility = ICompatibleSameBothLocalScope | ICompatibleSameBothGlobalScope | ICompatibleAInBScope | ICompatibleBInAScope | IIncompatibleParallelInProjectScope | IIncompatibleParallelInCommonParentScope | IIncompatibleAIsGlobalBIsNotScope | IIncompatibleBIsGlobalAIsNotScope;
31862
31899
 
@@ -32080,6 +32117,17 @@ export declare enum BaseValueDescriptorIds {
32080
32117
  getDataType(changeSet?: ChangeSet | null): DataTypeState | null;
32081
32118
  }
32082
32119
 
32120
+ declare namespace searchStatementDefs {
32121
+ export {
32122
+ SearchStatementNodeType,
32123
+ AggregationStatementType,
32124
+ SQLFunctionCategory,
32125
+ SQLDataType,
32126
+ FunctionNames
32127
+ }
32128
+ }
32129
+ export { searchStatementDefs }
32130
+
32083
32131
  export declare const searchStatementErrorGlobalValueDescriptor: IValueDescriptorTransfer;
32084
32132
 
32085
32133
  export declare const searchStatementErrorGlobalValueDescriptorDataType: IDataTypeTransfer;
@@ -32123,6 +32171,7 @@ export declare enum BaseValueDescriptorIds {
32123
32171
  sorting: SortStatement[];
32124
32172
  dataSources: DataSource[];
32125
32173
  constructor(id: string);
32174
+ get validationErrors(): string[];
32126
32175
  get isUntouchedEntity(): boolean;
32127
32176
  get usedDataSources(): DataSource[];
32128
32177
  get type(): SearchStatementNodeType.SearchStatement;
@@ -32166,10 +32215,7 @@ export declare enum BaseValueDescriptorIds {
32166
32215
  export {
32167
32216
  resolveAreThereConflictingColumnsInSelectAll,
32168
32217
  whereStatementOperatorToSQL,
32169
- SearchStatementNodeType,
32170
32218
  ISearchNode,
32171
- AggregationStatementType,
32172
- SQLFunctionCategory,
32173
32219
  FunctionArgument,
32174
32220
  FunctionCall,
32175
32221
  AggregationStatement,
@@ -32797,7 +32843,7 @@ export declare enum BaseValueDescriptorIds {
32797
32843
 
32798
32844
  declare class SortStatement implements ISearchNode {
32799
32845
  owner: SearchStatementState;
32800
- column: ColumnRef | null;
32846
+ column: ColumnRef | FunctionCall | null;
32801
32847
  direction: SortStatementDirection;
32802
32848
  index: number;
32803
32849
  constructor(owner: SearchStatementState);
@@ -32936,11 +32982,12 @@ export declare enum BaseValueDescriptorIds {
32936
32982
 
32937
32983
  export { SQLAST }
32938
32984
 
32985
+ declare type SQLDataType = 'string' | 'number' | 'boolean' | 'date' | 'table' | 'any' | 'json' | 'array';
32986
+
32939
32987
  declare enum SQLFunctionCategory {
32940
32988
  Scalar = "SCALAR",
32941
32989
  Aggregate = "AGGREGATE",
32942
- TableValued = "TABLE_VALUED",
32943
- Window = "WINDOW"
32990
+ TableValued = "TABLE_VALUED"
32944
32991
  }
32945
32992
 
32946
32993
  export declare const sqlRowTransformerBuiltInBaseEntity: IBuiltInBaseEntityTransfer;
@@ -35897,9 +35944,9 @@ export declare enum BaseValueDescriptorIds {
35897
35944
  parent: WhereStatement | null;
35898
35945
  and: WhereStatement[];
35899
35946
  or: WhereStatement[];
35900
- left: ColumnRef | ValueRef | SearchStatementLiteralValue | null;
35947
+ left: ColumnRef | ValueRef | SearchStatementLiteralValue | FunctionCall | null;
35901
35948
  operator: WhereStatementOperator | null;
35902
- right: ColumnRef | ValueRef | SearchStatementLiteralValue | null;
35949
+ right: ColumnRef | ValueRef | SearchStatementLiteralValue | FunctionCall | null;
35903
35950
  _id: string;
35904
35951
  constructor(owner: SearchStatementState, parent?: WhereStatement);
35905
35952
  get type(): SearchStatementNodeType.WhereStatement;
@@ -35910,6 +35957,7 @@ export declare enum BaseValueDescriptorIds {
35910
35957
  sanitize(): void;
35911
35958
  removeFromParent(): void;
35912
35959
  remove(): void;
35960
+ hasFunctionOfCategory(category: SQLFunctionCategory): boolean;
35913
35961
  }
35914
35962
 
35915
35963
  declare enum WhereStatementOperator {