@itwin/ecsql-common 5.0.0-dev.4 → 5.0.0-dev.41
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.
- package/CHANGELOG.md +26 -1
- package/lib/cjs/ECSqlAst.js +67 -67
- package/lib/cjs/ECSqlAst.js.map +1 -1
- package/lib/esm/ECSqlAst.js +67 -67
- package/lib/esm/ECSqlAst.js.map +1 -1
- package/package.json +6 -6
package/lib/cjs/ECSqlAst.js
CHANGED
|
@@ -255,6 +255,7 @@ exports.ComputedExpr = ComputedExpr;
|
|
|
255
255
|
* @alpha
|
|
256
256
|
*/
|
|
257
257
|
class BooleanExpr extends ComputedExpr {
|
|
258
|
+
static { this.deserializableIds = [NativeExpIds.BinaryBoolean, NativeExpIds.BooleanFactor, NativeExpIds.SubqueryTest, NativeExpIds.AllOrAny, NativeExpIds.BooleanFactor]; }
|
|
258
259
|
static deserialize(node) {
|
|
259
260
|
if (node.id === NativeExpIds.BinaryBoolean) {
|
|
260
261
|
const op = node.op;
|
|
@@ -291,7 +292,6 @@ class BooleanExpr extends ComputedExpr {
|
|
|
291
292
|
}
|
|
292
293
|
}
|
|
293
294
|
exports.BooleanExpr = BooleanExpr;
|
|
294
|
-
BooleanExpr.deserializableIds = [NativeExpIds.BinaryBoolean, NativeExpIds.BooleanFactor, NativeExpIds.SubqueryTest, NativeExpIds.AllOrAny, NativeExpIds.BooleanFactor];
|
|
295
295
|
/**
|
|
296
296
|
* Base class for all value expressions. Following is list of subclasses.
|
|
297
297
|
* @see [[SubqueryExpr]]
|
|
@@ -308,6 +308,19 @@ BooleanExpr.deserializableIds = [NativeExpIds.BinaryBoolean, NativeExpIds.Boolea
|
|
|
308
308
|
* @alpha
|
|
309
309
|
*/
|
|
310
310
|
class ValueExpr extends ComputedExpr {
|
|
311
|
+
static { this.deserializableIds = [
|
|
312
|
+
NativeExpIds.LiteralValue,
|
|
313
|
+
NativeExpIds.Parameter,
|
|
314
|
+
NativeExpIds.FunctionCall,
|
|
315
|
+
NativeExpIds.Cast,
|
|
316
|
+
NativeExpIds.BinaryValue,
|
|
317
|
+
NativeExpIds.SearchCaseValue,
|
|
318
|
+
NativeExpIds.IIF,
|
|
319
|
+
NativeExpIds.UnaryValue,
|
|
320
|
+
NativeExpIds.PropertyName,
|
|
321
|
+
NativeExpIds.Subquery,
|
|
322
|
+
NativeExpIds.NavValueCreationFunc,
|
|
323
|
+
]; }
|
|
311
324
|
static deserialize(node) {
|
|
312
325
|
if (node.id === NativeExpIds.UnaryValue) {
|
|
313
326
|
return UnaryValueExpr.deserialize(node);
|
|
@@ -345,19 +358,6 @@ class ValueExpr extends ComputedExpr {
|
|
|
345
358
|
}
|
|
346
359
|
}
|
|
347
360
|
exports.ValueExpr = ValueExpr;
|
|
348
|
-
ValueExpr.deserializableIds = [
|
|
349
|
-
NativeExpIds.LiteralValue,
|
|
350
|
-
NativeExpIds.Parameter,
|
|
351
|
-
NativeExpIds.FunctionCall,
|
|
352
|
-
NativeExpIds.Cast,
|
|
353
|
-
NativeExpIds.BinaryValue,
|
|
354
|
-
NativeExpIds.SearchCaseValue,
|
|
355
|
-
NativeExpIds.IIF,
|
|
356
|
-
NativeExpIds.UnaryValue,
|
|
357
|
-
NativeExpIds.PropertyName,
|
|
358
|
-
NativeExpIds.Subquery,
|
|
359
|
-
NativeExpIds.NavValueCreationFunc,
|
|
360
|
-
];
|
|
361
361
|
/**
|
|
362
362
|
* Base class for expressions that can be used in FROM clause of a SELECT. Following list of this subclasses.
|
|
363
363
|
* @see [[ClassRefExpr]]
|
|
@@ -370,6 +370,13 @@ ValueExpr.deserializableIds = [
|
|
|
370
370
|
* @alpha
|
|
371
371
|
*/
|
|
372
372
|
class ClassRefExpr extends Expr {
|
|
373
|
+
static { this.deserializableIds = [
|
|
374
|
+
NativeExpIds.ClassName,
|
|
375
|
+
NativeExpIds.SubqueryRef,
|
|
376
|
+
NativeExpIds.UsingRelationshipJoinExp,
|
|
377
|
+
NativeExpIds.QualifiedJoin,
|
|
378
|
+
NativeExpIds.CommonTableBlockName,
|
|
379
|
+
]; }
|
|
373
380
|
static deserialize(node) {
|
|
374
381
|
if (node.id === NativeExpIds.ClassName) {
|
|
375
382
|
return ClassNameExpr.deserialize(node);
|
|
@@ -393,13 +400,6 @@ class ClassRefExpr extends Expr {
|
|
|
393
400
|
}
|
|
394
401
|
}
|
|
395
402
|
exports.ClassRefExpr = ClassRefExpr;
|
|
396
|
-
ClassRefExpr.deserializableIds = [
|
|
397
|
-
NativeExpIds.ClassName,
|
|
398
|
-
NativeExpIds.SubqueryRef,
|
|
399
|
-
NativeExpIds.UsingRelationshipJoinExp,
|
|
400
|
-
NativeExpIds.QualifiedJoin,
|
|
401
|
-
NativeExpIds.CommonTableBlockName,
|
|
402
|
-
];
|
|
403
403
|
/**
|
|
404
404
|
* Write expression tree to string
|
|
405
405
|
* @alpha
|
|
@@ -504,6 +504,7 @@ exports.ECSqlWriter = ECSqlWriter;
|
|
|
504
504
|
* @alpha
|
|
505
505
|
*/
|
|
506
506
|
class DerivedPropertyExpr extends Expr {
|
|
507
|
+
static { this.type = ExprType.DerivedProperty; }
|
|
507
508
|
constructor(computedExpr, alias) {
|
|
508
509
|
super(DerivedPropertyExpr.type);
|
|
509
510
|
this.computedExpr = computedExpr;
|
|
@@ -527,12 +528,12 @@ class DerivedPropertyExpr extends Expr {
|
|
|
527
528
|
}
|
|
528
529
|
}
|
|
529
530
|
exports.DerivedPropertyExpr = DerivedPropertyExpr;
|
|
530
|
-
DerivedPropertyExpr.type = ExprType.DerivedProperty;
|
|
531
531
|
/**
|
|
532
532
|
* Describes a ECSQL delete statement.
|
|
533
533
|
* @alpha
|
|
534
534
|
*/
|
|
535
535
|
class DeleteStatementExpr extends StatementExpr {
|
|
536
|
+
static { this.type = ExprType.DeleteStatement; }
|
|
536
537
|
constructor(className, where, options) {
|
|
537
538
|
super(DeleteStatementExpr.type);
|
|
538
539
|
this.className = className;
|
|
@@ -573,12 +574,12 @@ class DeleteStatementExpr extends StatementExpr {
|
|
|
573
574
|
}
|
|
574
575
|
}
|
|
575
576
|
exports.DeleteStatementExpr = DeleteStatementExpr;
|
|
576
|
-
DeleteStatementExpr.type = ExprType.DeleteStatement;
|
|
577
577
|
/**
|
|
578
578
|
* Describe a ECSQL Insert statement.
|
|
579
579
|
* @alpha
|
|
580
580
|
*/
|
|
581
581
|
class InsertStatementExpr extends StatementExpr {
|
|
582
|
+
static { this.type = ExprType.InsertStatement; }
|
|
582
583
|
constructor(className, values, propertyNames) {
|
|
583
584
|
super(InsertStatementExpr.type);
|
|
584
585
|
this.className = className;
|
|
@@ -637,12 +638,12 @@ class InsertStatementExpr extends StatementExpr {
|
|
|
637
638
|
}
|
|
638
639
|
}
|
|
639
640
|
exports.InsertStatementExpr = InsertStatementExpr;
|
|
640
|
-
InsertStatementExpr.type = ExprType.InsertStatement;
|
|
641
641
|
/**
|
|
642
642
|
* Describes a JOIN clause e.g. <classNameExpr> JOIN <classNameExpr> ON <joinspec>
|
|
643
643
|
* @alpha
|
|
644
644
|
*/
|
|
645
645
|
class QualifiedJoinExpr extends ClassRefExpr {
|
|
646
|
+
static { this.type = ExprType.QualifiedJoin; }
|
|
646
647
|
constructor(joinType, from, to, spec) {
|
|
647
648
|
super(QualifiedJoinExpr.type);
|
|
648
649
|
this.joinType = joinType;
|
|
@@ -719,12 +720,12 @@ class QualifiedJoinExpr extends ClassRefExpr {
|
|
|
719
720
|
}
|
|
720
721
|
}
|
|
721
722
|
exports.QualifiedJoinExpr = QualifiedJoinExpr;
|
|
722
|
-
QualifiedJoinExpr.type = ExprType.QualifiedJoin;
|
|
723
723
|
/**
|
|
724
724
|
* Describe a JOIN USING clause.
|
|
725
725
|
* @alpha
|
|
726
726
|
*/
|
|
727
727
|
class UsingRelationshipJoinExpr extends ClassRefExpr {
|
|
728
|
+
static { this.type = ExprType.UsingRelationshipJoin; }
|
|
728
729
|
constructor(fromClassName, toClassName, toRelClassName, direction) {
|
|
729
730
|
super(UsingRelationshipJoinExpr.type);
|
|
730
731
|
this.fromClassName = fromClassName;
|
|
@@ -762,12 +763,12 @@ class UsingRelationshipJoinExpr extends ClassRefExpr {
|
|
|
762
763
|
}
|
|
763
764
|
}
|
|
764
765
|
exports.UsingRelationshipJoinExpr = UsingRelationshipJoinExpr;
|
|
765
|
-
UsingRelationshipJoinExpr.type = ExprType.UsingRelationshipJoin;
|
|
766
766
|
/**
|
|
767
767
|
* Describe subquery result test e.g. EXISTS(<subquery>)
|
|
768
768
|
* @alpha
|
|
769
769
|
*/
|
|
770
770
|
class SubqueryTestExpr extends BooleanExpr {
|
|
771
|
+
static { this.type = ExprType.SubqueryTest; }
|
|
771
772
|
constructor(op, query) {
|
|
772
773
|
super(SubqueryTestExpr.type);
|
|
773
774
|
this.op = op;
|
|
@@ -790,12 +791,12 @@ class SubqueryTestExpr extends BooleanExpr {
|
|
|
790
791
|
}
|
|
791
792
|
}
|
|
792
793
|
exports.SubqueryTestExpr = SubqueryTestExpr;
|
|
793
|
-
SubqueryTestExpr.type = ExprType.SubqueryTest;
|
|
794
794
|
/**
|
|
795
795
|
* Describe a subquery when used in FROM clause.
|
|
796
796
|
* @alpha
|
|
797
797
|
*/
|
|
798
798
|
class SubqueryRefExpr extends ClassRefExpr {
|
|
799
|
+
static { this.type = ExprType.SubqueryRef; }
|
|
799
800
|
constructor(query, polymorphicInfo, alias) {
|
|
800
801
|
super(SubqueryRefExpr.type);
|
|
801
802
|
this.query = query;
|
|
@@ -830,12 +831,12 @@ class SubqueryRefExpr extends ClassRefExpr {
|
|
|
830
831
|
}
|
|
831
832
|
}
|
|
832
833
|
exports.SubqueryRefExpr = SubqueryRefExpr;
|
|
833
|
-
SubqueryRefExpr.type = ExprType.SubqueryRef;
|
|
834
834
|
/**
|
|
835
835
|
* Describe a optionally compound SELECT statement.
|
|
836
836
|
* @alpha
|
|
837
837
|
*/
|
|
838
838
|
class SelectStatementExpr extends StatementExpr {
|
|
839
|
+
static { this.type = ExprType.SelectStatement; }
|
|
839
840
|
constructor(singleSelect, nextSelect) {
|
|
840
841
|
super(SelectStatementExpr.type);
|
|
841
842
|
this.singleSelect = singleSelect;
|
|
@@ -879,12 +880,12 @@ class SelectStatementExpr extends StatementExpr {
|
|
|
879
880
|
}
|
|
880
881
|
}
|
|
881
882
|
exports.SelectStatementExpr = SelectStatementExpr;
|
|
882
|
-
SelectStatementExpr.type = ExprType.SelectStatement;
|
|
883
883
|
/**
|
|
884
884
|
* Describe selection in a SELECT query
|
|
885
885
|
* @alpha
|
|
886
886
|
*/
|
|
887
887
|
class SelectionClauseExpr extends Expr {
|
|
888
|
+
static { this.type = ExprType.SelectionClause; }
|
|
888
889
|
constructor(derivedPropertyList) {
|
|
889
890
|
super(SelectionClauseExpr.type);
|
|
890
891
|
this.derivedPropertyList = derivedPropertyList;
|
|
@@ -908,12 +909,12 @@ class SelectionClauseExpr extends Expr {
|
|
|
908
909
|
}
|
|
909
910
|
}
|
|
910
911
|
exports.SelectionClauseExpr = SelectionClauseExpr;
|
|
911
|
-
SelectionClauseExpr.type = ExprType.SelectionClause;
|
|
912
912
|
/**
|
|
913
913
|
* Describe a GROUP BY clause in a SELECT statement.
|
|
914
914
|
* @alpha
|
|
915
915
|
*/
|
|
916
916
|
class GroupByClauseExpr extends Expr {
|
|
917
|
+
static { this.type = ExprType.GroupByClause; }
|
|
917
918
|
constructor(exprList) {
|
|
918
919
|
super(GroupByClauseExpr.type);
|
|
919
920
|
this.exprList = exprList;
|
|
@@ -941,12 +942,12 @@ class GroupByClauseExpr extends Expr {
|
|
|
941
942
|
}
|
|
942
943
|
}
|
|
943
944
|
exports.GroupByClauseExpr = GroupByClauseExpr;
|
|
944
|
-
GroupByClauseExpr.type = ExprType.GroupByClause;
|
|
945
945
|
/**
|
|
946
946
|
* Describe a HAVING clause in a SELECT statement.
|
|
947
947
|
* @alpha
|
|
948
948
|
*/
|
|
949
949
|
class HavingClauseExpr extends Expr {
|
|
950
|
+
static { this.type = ExprType.HavingClause; }
|
|
950
951
|
constructor(filterExpr) {
|
|
951
952
|
super(HavingClauseExpr.type);
|
|
952
953
|
this.filterExpr = filterExpr;
|
|
@@ -967,12 +968,12 @@ class HavingClauseExpr extends Expr {
|
|
|
967
968
|
}
|
|
968
969
|
}
|
|
969
970
|
exports.HavingClauseExpr = HavingClauseExpr;
|
|
970
|
-
HavingClauseExpr.type = ExprType.HavingClause;
|
|
971
971
|
/**
|
|
972
972
|
* Describe a FROM clause in a SELECT statement.
|
|
973
973
|
* @alpha
|
|
974
974
|
*/
|
|
975
975
|
class FromClauseExpr extends Expr {
|
|
976
|
+
static { this.type = ExprType.FromClause; }
|
|
976
977
|
constructor(classRefs) {
|
|
977
978
|
super(FromClauseExpr.type);
|
|
978
979
|
this.classRefs = classRefs;
|
|
@@ -998,12 +999,12 @@ class FromClauseExpr extends Expr {
|
|
|
998
999
|
}
|
|
999
1000
|
}
|
|
1000
1001
|
exports.FromClauseExpr = FromClauseExpr;
|
|
1001
|
-
FromClauseExpr.type = ExprType.FromClause;
|
|
1002
1002
|
/**
|
|
1003
1003
|
* Describe a WHERE clause in a SELECT, UPDATE and DELETE statement.
|
|
1004
1004
|
* @alpha
|
|
1005
1005
|
*/
|
|
1006
1006
|
class WhereClauseExp extends Expr {
|
|
1007
|
+
static { this.type = ExprType.WhereClause; }
|
|
1007
1008
|
constructor(filterExpr) {
|
|
1008
1009
|
super(WhereClauseExp.type);
|
|
1009
1010
|
this.filterExpr = filterExpr;
|
|
@@ -1024,12 +1025,12 @@ class WhereClauseExp extends Expr {
|
|
|
1024
1025
|
}
|
|
1025
1026
|
}
|
|
1026
1027
|
exports.WhereClauseExp = WhereClauseExp;
|
|
1027
|
-
WhereClauseExp.type = ExprType.WhereClause;
|
|
1028
1028
|
/**
|
|
1029
1029
|
* Describe a single sorted term in a ORDER BY clause of a SELECT statement.
|
|
1030
1030
|
* @alpha
|
|
1031
1031
|
*/
|
|
1032
1032
|
class OrderBySpecExpr extends Expr {
|
|
1033
|
+
static { this.type = ExprType.OrderBySpec; }
|
|
1033
1034
|
constructor(term, sortDirection, nulls) {
|
|
1034
1035
|
super(OrderBySpecExpr.type);
|
|
1035
1036
|
this.term = term;
|
|
@@ -1060,12 +1061,12 @@ class OrderBySpecExpr extends Expr {
|
|
|
1060
1061
|
}
|
|
1061
1062
|
}
|
|
1062
1063
|
exports.OrderBySpecExpr = OrderBySpecExpr;
|
|
1063
|
-
OrderBySpecExpr.type = ExprType.OrderBySpec;
|
|
1064
1064
|
/**
|
|
1065
1065
|
* Describe a ORDER BY clause in a SELECT statement.
|
|
1066
1066
|
* @alpha
|
|
1067
1067
|
*/
|
|
1068
1068
|
class OrderByClauseExpr extends Expr {
|
|
1069
|
+
static { this.type = ExprType.OrderByClause; }
|
|
1069
1070
|
constructor(terms) {
|
|
1070
1071
|
super(OrderByClauseExpr.type);
|
|
1071
1072
|
this.terms = terms;
|
|
@@ -1093,12 +1094,12 @@ class OrderByClauseExpr extends Expr {
|
|
|
1093
1094
|
}
|
|
1094
1095
|
}
|
|
1095
1096
|
exports.OrderByClauseExpr = OrderByClauseExpr;
|
|
1096
|
-
OrderByClauseExpr.type = ExprType.OrderByClause;
|
|
1097
1097
|
/**
|
|
1098
1098
|
* Describe a LIMIT clause in a SELECT statement.
|
|
1099
1099
|
* @alpha
|
|
1100
1100
|
*/
|
|
1101
1101
|
class LimitClauseExpr extends Expr {
|
|
1102
|
+
static { this.type = ExprType.LimitClause; }
|
|
1102
1103
|
constructor(limit, offset) {
|
|
1103
1104
|
super(LimitClauseExpr.type);
|
|
1104
1105
|
this.limit = limit;
|
|
@@ -1129,12 +1130,12 @@ class LimitClauseExpr extends Expr {
|
|
|
1129
1130
|
}
|
|
1130
1131
|
}
|
|
1131
1132
|
exports.LimitClauseExpr = LimitClauseExpr;
|
|
1132
|
-
LimitClauseExpr.type = ExprType.LimitClause;
|
|
1133
1133
|
/**
|
|
1134
1134
|
* Describe a single select statement.
|
|
1135
1135
|
* @alpha
|
|
1136
1136
|
*/
|
|
1137
1137
|
class SelectExpr extends Expr {
|
|
1138
|
+
static { this.type = ExprType.Select; }
|
|
1138
1139
|
constructor(selection, rowQuantifier, from, where, groupBy, having, orderBy, limit, options) {
|
|
1139
1140
|
super(SelectExpr.type);
|
|
1140
1141
|
this.selection = selection;
|
|
@@ -1223,12 +1224,12 @@ class SelectExpr extends Expr {
|
|
|
1223
1224
|
}
|
|
1224
1225
|
}
|
|
1225
1226
|
exports.SelectExpr = SelectExpr;
|
|
1226
|
-
SelectExpr.type = ExprType.Select;
|
|
1227
1227
|
/**
|
|
1228
1228
|
* Describe a subquery when used as value. This kind of query expect to return one column and one one value.
|
|
1229
1229
|
* @alpha
|
|
1230
1230
|
*/
|
|
1231
1231
|
class SubqueryExpr extends ValueExpr {
|
|
1232
|
+
static { this.type = ExprType.Subquery; }
|
|
1232
1233
|
constructor(query) {
|
|
1233
1234
|
super(SubqueryExpr.type);
|
|
1234
1235
|
this.query = query;
|
|
@@ -1253,12 +1254,12 @@ class SubqueryExpr extends ValueExpr {
|
|
|
1253
1254
|
}
|
|
1254
1255
|
}
|
|
1255
1256
|
exports.SubqueryExpr = SubqueryExpr;
|
|
1256
|
-
SubqueryExpr.type = ExprType.Subquery;
|
|
1257
1257
|
/**
|
|
1258
1258
|
* Describe a binary boolean expression in ECSQL.
|
|
1259
1259
|
* @alpha
|
|
1260
1260
|
*/
|
|
1261
1261
|
class BinaryBooleanExpr extends BooleanExpr {
|
|
1262
|
+
static { this.type = ExprType.BinaryBoolean; }
|
|
1262
1263
|
constructor(op, lhsExpr, rhsExpr, not) {
|
|
1263
1264
|
super(BinaryBooleanExpr.type);
|
|
1264
1265
|
this.op = op;
|
|
@@ -1285,12 +1286,12 @@ class BinaryBooleanExpr extends BooleanExpr {
|
|
|
1285
1286
|
}
|
|
1286
1287
|
}
|
|
1287
1288
|
exports.BinaryBooleanExpr = BinaryBooleanExpr;
|
|
1288
|
-
BinaryBooleanExpr.type = ExprType.BinaryBoolean;
|
|
1289
1289
|
/**
|
|
1290
1290
|
* Describe a <expr> IS NULL boolean expression
|
|
1291
1291
|
* @alpha
|
|
1292
1292
|
*/
|
|
1293
1293
|
class IsNullExpr extends BooleanExpr {
|
|
1294
|
+
static { this.type = ExprType.IsNull; }
|
|
1294
1295
|
constructor(operandExpr, not) {
|
|
1295
1296
|
super(IsNullExpr.type);
|
|
1296
1297
|
this.operandExpr = operandExpr;
|
|
@@ -1332,12 +1333,12 @@ class IsNullExpr extends BooleanExpr {
|
|
|
1332
1333
|
}
|
|
1333
1334
|
}
|
|
1334
1335
|
exports.IsNullExpr = IsNullExpr;
|
|
1335
|
-
IsNullExpr.type = ExprType.IsNull;
|
|
1336
1336
|
/**
|
|
1337
1337
|
* Describe a <expr> IS (type1[, type2]) in ECSQL.
|
|
1338
1338
|
* @alpha
|
|
1339
1339
|
*/
|
|
1340
1340
|
class IsOfTypeExpr extends BooleanExpr {
|
|
1341
|
+
static { this.type = ExprType.IsOfType; }
|
|
1341
1342
|
constructor(lhsExpr, typeNames, not) {
|
|
1342
1343
|
super(IsOfTypeExpr.type);
|
|
1343
1344
|
this.lhsExpr = lhsExpr;
|
|
@@ -1383,12 +1384,12 @@ class IsOfTypeExpr extends BooleanExpr {
|
|
|
1383
1384
|
}
|
|
1384
1385
|
}
|
|
1385
1386
|
exports.IsOfTypeExpr = IsOfTypeExpr;
|
|
1386
|
-
IsOfTypeExpr.type = ExprType.IsOfType;
|
|
1387
1387
|
/**
|
|
1388
1388
|
* Describe a NOT <expr> boolean expression
|
|
1389
1389
|
* @alpha
|
|
1390
1390
|
*/
|
|
1391
1391
|
class NotExpr extends BooleanExpr {
|
|
1392
|
+
static { this.type = ExprType.Not; }
|
|
1392
1393
|
constructor(operandExpr) {
|
|
1393
1394
|
super(NotExpr.type);
|
|
1394
1395
|
this.operandExpr = operandExpr;
|
|
@@ -1412,12 +1413,12 @@ class NotExpr extends BooleanExpr {
|
|
|
1412
1413
|
}
|
|
1413
1414
|
}
|
|
1414
1415
|
exports.NotExpr = NotExpr;
|
|
1415
|
-
NotExpr.type = ExprType.Not;
|
|
1416
1416
|
/**
|
|
1417
1417
|
* Describe a <expr> IN subquery|(val1[,val2...]) boolean expression
|
|
1418
1418
|
* @alpha
|
|
1419
1419
|
*/
|
|
1420
1420
|
class InExpr extends BooleanExpr {
|
|
1421
|
+
static { this.type = ExprType.In; }
|
|
1421
1422
|
constructor(lhsExpr, rhsExpr, not) {
|
|
1422
1423
|
super(InExpr.type);
|
|
1423
1424
|
this.lhsExpr = lhsExpr;
|
|
@@ -1480,12 +1481,12 @@ class InExpr extends BooleanExpr {
|
|
|
1480
1481
|
}
|
|
1481
1482
|
}
|
|
1482
1483
|
exports.InExpr = InExpr;
|
|
1483
|
-
InExpr.type = ExprType.In;
|
|
1484
1484
|
/**
|
|
1485
1485
|
* Describe a <expr> LIKE <expr> [ESCAPE <expr>] boolean expression
|
|
1486
1486
|
* @alpha
|
|
1487
1487
|
*/
|
|
1488
1488
|
class LikeExpr extends BooleanExpr {
|
|
1489
|
+
static { this.type = ExprType.Like; }
|
|
1489
1490
|
constructor(lhsExpr, patternExpr, escapeExpr, not) {
|
|
1490
1491
|
super(LikeExpr.type);
|
|
1491
1492
|
this.lhsExpr = lhsExpr;
|
|
@@ -1534,12 +1535,12 @@ class LikeExpr extends BooleanExpr {
|
|
|
1534
1535
|
}
|
|
1535
1536
|
}
|
|
1536
1537
|
exports.LikeExpr = LikeExpr;
|
|
1537
|
-
LikeExpr.type = ExprType.Like;
|
|
1538
1538
|
/**
|
|
1539
1539
|
* Describe a <expr> BETWEEN <expr> AND <expr> boolean expression
|
|
1540
1540
|
* @alpha
|
|
1541
1541
|
*/
|
|
1542
1542
|
class BetweenExpr extends BooleanExpr {
|
|
1543
|
+
static { this.type = ExprType.Between; }
|
|
1543
1544
|
constructor(lhsExpr, lowerBoundExpr, upperBoundExpr, not) {
|
|
1544
1545
|
super(BetweenExpr.type);
|
|
1545
1546
|
this.lhsExpr = lhsExpr;
|
|
@@ -1581,12 +1582,12 @@ class BetweenExpr extends BooleanExpr {
|
|
|
1581
1582
|
}
|
|
1582
1583
|
}
|
|
1583
1584
|
exports.BetweenExpr = BetweenExpr;
|
|
1584
|
-
BetweenExpr.type = ExprType.Between;
|
|
1585
1585
|
/**
|
|
1586
1586
|
* Describe a common table expression base query statement
|
|
1587
1587
|
* @alpha
|
|
1588
1588
|
*/
|
|
1589
1589
|
class CteExpr extends StatementExpr {
|
|
1590
|
+
static { this.type = ExprType.Cte; }
|
|
1590
1591
|
constructor(cteBlocks, query, recursive) {
|
|
1591
1592
|
super(CteExpr.type);
|
|
1592
1593
|
this.cteBlocks = cteBlocks;
|
|
@@ -1621,12 +1622,12 @@ class CteExpr extends StatementExpr {
|
|
|
1621
1622
|
}
|
|
1622
1623
|
}
|
|
1623
1624
|
exports.CteExpr = CteExpr;
|
|
1624
|
-
CteExpr.type = ExprType.Cte;
|
|
1625
1625
|
/**
|
|
1626
1626
|
* Describe a single block of CTE that can be reference in FROM clause of a SELECT
|
|
1627
1627
|
* @alpha
|
|
1628
1628
|
*/
|
|
1629
1629
|
class CteBlockExpr extends Expr {
|
|
1630
|
+
static { this.type = ExprType.CteBlock; }
|
|
1630
1631
|
constructor(name, query, props) {
|
|
1631
1632
|
super(CteBlockExpr.type);
|
|
1632
1633
|
this.name = name;
|
|
@@ -1667,12 +1668,12 @@ class CteBlockExpr extends Expr {
|
|
|
1667
1668
|
}
|
|
1668
1669
|
}
|
|
1669
1670
|
exports.CteBlockExpr = CteBlockExpr;
|
|
1670
|
-
CteBlockExpr.type = ExprType.CteBlock;
|
|
1671
1671
|
/**
|
|
1672
1672
|
* Describe a name reference to a CTE block.
|
|
1673
1673
|
* @alpha
|
|
1674
1674
|
*/
|
|
1675
1675
|
class CteBlockRefExpr extends ClassRefExpr {
|
|
1676
|
+
static { this.type = ExprType.CteBlockRef; }
|
|
1676
1677
|
constructor(name, alias) {
|
|
1677
1678
|
super(CteBlockRefExpr.type);
|
|
1678
1679
|
this.name = name;
|
|
@@ -1695,12 +1696,12 @@ class CteBlockRefExpr extends ClassRefExpr {
|
|
|
1695
1696
|
}
|
|
1696
1697
|
}
|
|
1697
1698
|
exports.CteBlockRefExpr = CteBlockRefExpr;
|
|
1698
|
-
CteBlockRefExpr.type = ExprType.CteBlockRef;
|
|
1699
1699
|
/**
|
|
1700
1700
|
* Describe a table value function expression in ECSQL that appear in FROM clause of query.
|
|
1701
1701
|
* @alpha
|
|
1702
1702
|
*/
|
|
1703
1703
|
class TableValuedFuncExpr extends ClassRefExpr {
|
|
1704
|
+
static { this.type = ExprType.TableValuedFunc; }
|
|
1704
1705
|
constructor(schemaName, memberFunc, alias) {
|
|
1705
1706
|
super(TableValuedFuncExpr.type);
|
|
1706
1707
|
this.schemaName = schemaName;
|
|
@@ -1727,12 +1728,12 @@ class TableValuedFuncExpr extends ClassRefExpr {
|
|
|
1727
1728
|
}
|
|
1728
1729
|
}
|
|
1729
1730
|
exports.TableValuedFuncExpr = TableValuedFuncExpr;
|
|
1730
|
-
TableValuedFuncExpr.type = ExprType.TableValuedFunc;
|
|
1731
1731
|
/**
|
|
1732
1732
|
* Describe a class name reference in ECSQL that appear in FROM clause of a SELECT.
|
|
1733
1733
|
* @alpha
|
|
1734
1734
|
*/
|
|
1735
1735
|
class ClassNameExpr extends ClassRefExpr {
|
|
1736
|
+
static { this.type = ExprType.ClassName; }
|
|
1736
1737
|
constructor(schemaNameOrAlias, className, tablespace, alias, polymorphicInfo, memberFunc) {
|
|
1737
1738
|
super(ClassNameExpr.type);
|
|
1738
1739
|
this.schemaNameOrAlias = schemaNameOrAlias;
|
|
@@ -1804,12 +1805,12 @@ class ClassNameExpr extends ClassRefExpr {
|
|
|
1804
1805
|
}
|
|
1805
1806
|
}
|
|
1806
1807
|
exports.ClassNameExpr = ClassNameExpr;
|
|
1807
|
-
ClassNameExpr.type = ExprType.ClassName;
|
|
1808
1808
|
/**
|
|
1809
1809
|
* Describe a UPDATE statement in ECSQL.
|
|
1810
1810
|
* @alpha
|
|
1811
1811
|
*/
|
|
1812
1812
|
class UpdateStatementExpr extends StatementExpr {
|
|
1813
|
+
static { this.type = ExprType.UpdateStatement; }
|
|
1813
1814
|
constructor(className, assignement, where, options) {
|
|
1814
1815
|
super(UpdateStatementExpr.type);
|
|
1815
1816
|
this.className = className;
|
|
@@ -1852,12 +1853,12 @@ class UpdateStatementExpr extends StatementExpr {
|
|
|
1852
1853
|
}
|
|
1853
1854
|
}
|
|
1854
1855
|
exports.UpdateStatementExpr = UpdateStatementExpr;
|
|
1855
|
-
UpdateStatementExpr.type = ExprType.UpdateStatement;
|
|
1856
1856
|
/**
|
|
1857
1857
|
* Describe ECSQL option clause.
|
|
1858
1858
|
* @alpha
|
|
1859
1859
|
*/
|
|
1860
1860
|
class ECSqlOptionsClauseExpr extends Expr {
|
|
1861
|
+
static { this.type = ExprType.ECSqlOptionsClause; }
|
|
1861
1862
|
constructor(options) {
|
|
1862
1863
|
super(ECSqlOptionsClauseExpr.type);
|
|
1863
1864
|
this.options = options;
|
|
@@ -1887,12 +1888,12 @@ class ECSqlOptionsClauseExpr extends Expr {
|
|
|
1887
1888
|
}
|
|
1888
1889
|
}
|
|
1889
1890
|
exports.ECSqlOptionsClauseExpr = ECSqlOptionsClauseExpr;
|
|
1890
|
-
ECSqlOptionsClauseExpr.type = ExprType.ECSqlOptionsClause;
|
|
1891
1891
|
/**
|
|
1892
1892
|
* A single property value assignment for update clause
|
|
1893
1893
|
* @alpha
|
|
1894
1894
|
*/
|
|
1895
1895
|
class AssignmentExpr extends Expr {
|
|
1896
|
+
static { this.type = ExprType.Assignment; }
|
|
1896
1897
|
constructor(propertyName, valueExpr) {
|
|
1897
1898
|
super(SetClauseExpr.type);
|
|
1898
1899
|
this.propertyName = propertyName;
|
|
@@ -1914,12 +1915,12 @@ class AssignmentExpr extends Expr {
|
|
|
1914
1915
|
}
|
|
1915
1916
|
}
|
|
1916
1917
|
exports.AssignmentExpr = AssignmentExpr;
|
|
1917
|
-
AssignmentExpr.type = ExprType.Assignment;
|
|
1918
1918
|
/**
|
|
1919
1919
|
* Describe a set clause in a UPDATE statement
|
|
1920
1920
|
* @alpha
|
|
1921
1921
|
*/
|
|
1922
1922
|
class SetClauseExpr extends Expr {
|
|
1923
|
+
static { this.type = ExprType.SetClause; }
|
|
1923
1924
|
constructor(assignments) {
|
|
1924
1925
|
super(SetClauseExpr.type);
|
|
1925
1926
|
this.assignments = assignments;
|
|
@@ -1950,12 +1951,12 @@ class SetClauseExpr extends Expr {
|
|
|
1950
1951
|
}
|
|
1951
1952
|
}
|
|
1952
1953
|
exports.SetClauseExpr = SetClauseExpr;
|
|
1953
|
-
SetClauseExpr.type = ExprType.SetClause;
|
|
1954
1954
|
/**
|
|
1955
1955
|
* Describe a strong typed IIF function in ECSQL
|
|
1956
1956
|
* @alpha
|
|
1957
1957
|
*/
|
|
1958
1958
|
class IIFExpr extends ValueExpr {
|
|
1959
|
+
static { this.type = ExprType.IIF; }
|
|
1959
1960
|
constructor(whenExpr, thenExpr, elseExpr) {
|
|
1960
1961
|
super(IIFExpr.type);
|
|
1961
1962
|
this.whenExpr = whenExpr;
|
|
@@ -1983,12 +1984,12 @@ class IIFExpr extends ValueExpr {
|
|
|
1983
1984
|
}
|
|
1984
1985
|
}
|
|
1985
1986
|
exports.IIFExpr = IIFExpr;
|
|
1986
|
-
IIFExpr.type = ExprType.IIF;
|
|
1987
1987
|
/**
|
|
1988
1988
|
* Describe a CASE-WHEN-THEN expression in ECSQL
|
|
1989
1989
|
* @alpha
|
|
1990
1990
|
*/
|
|
1991
1991
|
class SearchCaseExpr extends ValueExpr {
|
|
1992
|
+
static { this.type = ExprType.SearchCase; }
|
|
1992
1993
|
constructor(whenThenList, elseExpr) {
|
|
1993
1994
|
super(SearchCaseExpr.type);
|
|
1994
1995
|
this.whenThenList = whenThenList;
|
|
@@ -2040,12 +2041,12 @@ class SearchCaseExpr extends ValueExpr {
|
|
|
2040
2041
|
}
|
|
2041
2042
|
}
|
|
2042
2043
|
exports.SearchCaseExpr = SearchCaseExpr;
|
|
2043
|
-
SearchCaseExpr.type = ExprType.SearchCase;
|
|
2044
2044
|
/**
|
|
2045
2045
|
* Describe a binary value expression
|
|
2046
2046
|
* @alpha
|
|
2047
2047
|
*/
|
|
2048
2048
|
class BinaryValueExpr extends ValueExpr {
|
|
2049
|
+
static { this.type = ExprType.BinaryValue; }
|
|
2049
2050
|
constructor(op, lhsExpr, rhsExpr) {
|
|
2050
2051
|
super(BinaryValueExpr.type);
|
|
2051
2052
|
this.op = op;
|
|
@@ -2070,12 +2071,12 @@ class BinaryValueExpr extends ValueExpr {
|
|
|
2070
2071
|
}
|
|
2071
2072
|
}
|
|
2072
2073
|
exports.BinaryValueExpr = BinaryValueExpr;
|
|
2073
|
-
BinaryValueExpr.type = ExprType.BinaryValue;
|
|
2074
2074
|
/**
|
|
2075
2075
|
* Cast a expression into a target time e.g. CAST(<expr> AS STRING)
|
|
2076
2076
|
* @alpha
|
|
2077
2077
|
*/
|
|
2078
2078
|
class CastExpr extends ValueExpr {
|
|
2079
|
+
static { this.type = ExprType.Cast; }
|
|
2079
2080
|
constructor(valueExpr, targetType) {
|
|
2080
2081
|
super(CastExpr.type);
|
|
2081
2082
|
this.valueExpr = valueExpr;
|
|
@@ -2102,12 +2103,12 @@ class CastExpr extends ValueExpr {
|
|
|
2102
2103
|
}
|
|
2103
2104
|
}
|
|
2104
2105
|
exports.CastExpr = CastExpr;
|
|
2105
|
-
CastExpr.type = ExprType.Cast;
|
|
2106
2106
|
/**
|
|
2107
2107
|
* Represent a member function called w.r.t a ClassNameExpr
|
|
2108
2108
|
* @alpha
|
|
2109
2109
|
*/
|
|
2110
2110
|
class MemberFuncCallExpr extends Expr {
|
|
2111
|
+
static { this.type = ExprType.MemberFuncCall; }
|
|
2111
2112
|
constructor(functionName, args) {
|
|
2112
2113
|
super(MemberFuncCallExpr.type);
|
|
2113
2114
|
this.functionName = functionName;
|
|
@@ -2136,12 +2137,12 @@ class MemberFuncCallExpr extends Expr {
|
|
|
2136
2137
|
}
|
|
2137
2138
|
}
|
|
2138
2139
|
exports.MemberFuncCallExpr = MemberFuncCallExpr;
|
|
2139
|
-
MemberFuncCallExpr.type = ExprType.MemberFuncCall;
|
|
2140
2140
|
/**
|
|
2141
2141
|
* Represent a function call in ecsql
|
|
2142
2142
|
* @alpha
|
|
2143
2143
|
*/
|
|
2144
2144
|
class FuncCallExpr extends ValueExpr {
|
|
2145
|
+
static { this.type = ExprType.FuncCall; }
|
|
2145
2146
|
constructor(functionName, args, allOrDistinct) {
|
|
2146
2147
|
super(FuncCallExpr.type);
|
|
2147
2148
|
this.functionName = functionName;
|
|
@@ -2278,12 +2279,12 @@ class FuncCallExpr extends ValueExpr {
|
|
|
2278
2279
|
}
|
|
2279
2280
|
}
|
|
2280
2281
|
exports.FuncCallExpr = FuncCallExpr;
|
|
2281
|
-
FuncCallExpr.type = ExprType.FuncCall;
|
|
2282
2282
|
/**
|
|
2283
2283
|
* Represent positional or named parameter
|
|
2284
2284
|
* @alpha
|
|
2285
2285
|
*/
|
|
2286
2286
|
class ParameterExpr extends ValueExpr {
|
|
2287
|
+
static { this.type = ExprType.Parameter; }
|
|
2287
2288
|
constructor(name) {
|
|
2288
2289
|
super(ParameterExpr.type);
|
|
2289
2290
|
this.name = name;
|
|
@@ -2305,12 +2306,12 @@ class ParameterExpr extends ValueExpr {
|
|
|
2305
2306
|
}
|
|
2306
2307
|
}
|
|
2307
2308
|
exports.ParameterExpr = ParameterExpr;
|
|
2308
|
-
ParameterExpr.type = ExprType.Parameter;
|
|
2309
2309
|
/**
|
|
2310
2310
|
* Unary value with operator e.g. [+|-|~]<number>
|
|
2311
2311
|
* @alpha
|
|
2312
2312
|
*/
|
|
2313
2313
|
class UnaryValueExpr extends ValueExpr {
|
|
2314
|
+
static { this.type = ExprType.Unary; }
|
|
2314
2315
|
constructor(op, valueExpr) {
|
|
2315
2316
|
super(UnaryValueExpr.type);
|
|
2316
2317
|
this.op = op;
|
|
@@ -2334,12 +2335,12 @@ class UnaryValueExpr extends ValueExpr {
|
|
|
2334
2335
|
}
|
|
2335
2336
|
}
|
|
2336
2337
|
exports.UnaryValueExpr = UnaryValueExpr;
|
|
2337
|
-
UnaryValueExpr.type = ExprType.Unary;
|
|
2338
2338
|
/**
|
|
2339
2339
|
* Represent constant literal like string, data, time, timestamp, number or null
|
|
2340
2340
|
* @alpha
|
|
2341
2341
|
*/
|
|
2342
2342
|
class LiteralExpr extends ValueExpr {
|
|
2343
|
+
static { this.type = ExprType.Literal; }
|
|
2343
2344
|
constructor(valueType, rawValue) {
|
|
2344
2345
|
super(LiteralExpr.type);
|
|
2345
2346
|
this.valueType = valueType;
|
|
@@ -2377,12 +2378,12 @@ class LiteralExpr extends ValueExpr {
|
|
|
2377
2378
|
static makeNull() { return new LiteralExpr(LiteralValueType.Null, ""); }
|
|
2378
2379
|
}
|
|
2379
2380
|
exports.LiteralExpr = LiteralExpr;
|
|
2380
|
-
LiteralExpr.type = ExprType.Literal;
|
|
2381
2381
|
/**
|
|
2382
2382
|
* Represent property name identifier
|
|
2383
2383
|
* @alpha
|
|
2384
2384
|
*/
|
|
2385
2385
|
class PropertyNameExpr extends ValueExpr {
|
|
2386
|
+
static { this.type = ExprType.PropertyName; }
|
|
2386
2387
|
constructor(propertyPath) {
|
|
2387
2388
|
super(PropertyNameExpr.type);
|
|
2388
2389
|
this.propertyPath = propertyPath;
|
|
@@ -2407,12 +2408,13 @@ class PropertyNameExpr extends ValueExpr {
|
|
|
2407
2408
|
}
|
|
2408
2409
|
}
|
|
2409
2410
|
exports.PropertyNameExpr = PropertyNameExpr;
|
|
2410
|
-
PropertyNameExpr.type = ExprType.PropertyName;
|
|
2411
2411
|
/**
|
|
2412
2412
|
* Represent navigation value creation function
|
|
2413
2413
|
* @alpha
|
|
2414
2414
|
*/
|
|
2415
2415
|
class NavValueCreationFuncExpr extends ValueExpr {
|
|
2416
|
+
static { this.type = ExprType.NavValueCreationFunc; }
|
|
2417
|
+
static { this.navValueCreationFuncExprName = "NAVIGATION_VALUE"; }
|
|
2416
2418
|
constructor(columnRefExp, idArgExp, classNameExp, relECClassIdExp) {
|
|
2417
2419
|
super(NavValueCreationFuncExpr.type);
|
|
2418
2420
|
this.columnRefExp = columnRefExp;
|
|
@@ -2448,6 +2450,4 @@ class NavValueCreationFuncExpr extends ValueExpr {
|
|
|
2448
2450
|
}
|
|
2449
2451
|
}
|
|
2450
2452
|
exports.NavValueCreationFuncExpr = NavValueCreationFuncExpr;
|
|
2451
|
-
NavValueCreationFuncExpr.type = ExprType.NavValueCreationFunc;
|
|
2452
|
-
NavValueCreationFuncExpr.navValueCreationFuncExprName = "NAVIGATION_VALUE";
|
|
2453
2453
|
//# sourceMappingURL=ECSqlAst.js.map
|