dsl-to-sql 1.0.0-fabric-1p-development.1
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/.turbo/turbo-build.log +9 -0
- package/.turbo/turbo-check-types.log +4 -0
- package/.turbo/turbo-lint.log +126 -0
- package/README.md +45 -0
- package/coverage/base.css +224 -0
- package/coverage/block-navigation.js +87 -0
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +236 -0
- package/coverage/prettify.css +1 -0
- package/coverage/prettify.js +2 -0
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +210 -0
- package/coverage/src/constants.ts.html +826 -0
- package/coverage/src/database_types.ts.html +136 -0
- package/coverage/src/epm-query-builder/EpmQueryBuilder.ts.html +166 -0
- package/coverage/src/epm-query-builder/base/BaseAdvancedAggregations.ts.html +568 -0
- package/coverage/src/epm-query-builder/base/BaseAnalyticalFunctions.ts.html +694 -0
- package/coverage/src/epm-query-builder/base/BaseCTEGenerator.ts.html +1459 -0
- package/coverage/src/epm-query-builder/base/BaseCountQueryBuilder.ts.html +400 -0
- package/coverage/src/epm-query-builder/base/BaseMeasureBuilder.ts.html +295 -0
- package/coverage/src/epm-query-builder/base/BaseOrderBuilder.ts.html +670 -0
- package/coverage/src/epm-query-builder/base/BasePaginationBuilder.ts.html +364 -0
- package/coverage/src/epm-query-builder/base/BaseQueryBuilder.ts.html +238 -0
- package/coverage/src/epm-query-builder/base/BaseRollupBuilder.ts.html +532 -0
- package/coverage/src/epm-query-builder/base/BaseSqlBuilder.ts.html +601 -0
- package/coverage/src/epm-query-builder/base/BaseSuperFilterBuilder.ts.html +1966 -0
- package/coverage/src/epm-query-builder/base/BaseUtilities.ts.html +1798 -0
- package/coverage/src/epm-query-builder/base/ColumnRefUtils.ts.html +211 -0
- package/coverage/src/epm-query-builder/base/RelationshipResolver.ts.html +706 -0
- package/coverage/src/epm-query-builder/base/SharedFilterBuilder.ts.html +1717 -0
- package/coverage/src/epm-query-builder/base/index.html +326 -0
- package/coverage/src/epm-query-builder/constants/Aggregations.ts.html +133 -0
- package/coverage/src/epm-query-builder/constants/Database.ts.html +103 -0
- package/coverage/src/epm-query-builder/constants/Source.ts.html +106 -0
- package/coverage/src/epm-query-builder/constants/index.html +146 -0
- package/coverage/src/epm-query-builder/dialects/duckdb/DuckDbAdvancedAggregations.ts.html +286 -0
- package/coverage/src/epm-query-builder/dialects/duckdb/DuckDbJoinBuilder.ts.html +280 -0
- package/coverage/src/epm-query-builder/dialects/duckdb/DuckDbMeasureBuilder.ts.html +1924 -0
- package/coverage/src/epm-query-builder/dialects/duckdb/DuckDbOrderBuilder.ts.html +769 -0
- package/coverage/src/epm-query-builder/dialects/duckdb/DuckDbPaginationBuilder.ts.html +643 -0
- package/coverage/src/epm-query-builder/dialects/duckdb/DuckDbQueryBuilder.ts.html +2644 -0
- package/coverage/src/epm-query-builder/dialects/duckdb/DuckDbRollupBuilder.ts.html +478 -0
- package/coverage/src/epm-query-builder/dialects/duckdb/DuckDbSuperFilterBuilder.ts.html +1195 -0
- package/coverage/src/epm-query-builder/dialects/duckdb/index.html +221 -0
- package/coverage/src/epm-query-builder/errors/QueryBuilderErrors.ts.html +280 -0
- package/coverage/src/epm-query-builder/errors/index.html +116 -0
- package/coverage/src/epm-query-builder/index.html +116 -0
- package/coverage/src/epm-query-builder/interfaces/IDatabaseQueryBuilder.ts.html +100 -0
- package/coverage/src/epm-query-builder/interfaces/index.html +131 -0
- package/coverage/src/epm-query-builder/interfaces/index.ts.html +88 -0
- package/coverage/src/epm-query-builder/utils/format.ts.html +151 -0
- package/coverage/src/epm-query-builder/utils/index.html +146 -0
- package/coverage/src/epm-query-builder/utils/sql.ts.html +247 -0
- package/coverage/src/epm-query-builder/utils/validation.ts.html +124 -0
- package/coverage/src/epm-query-builder/validation/QueryOptionsValidator.ts.html +631 -0
- package/coverage/src/epm-query-builder/validation/SqlQueryValidator.ts.html +475 -0
- package/coverage/src/epm-query-builder/validation/index.html +131 -0
- package/coverage/src/filters/FilterConditionBuilder.ts.html +427 -0
- package/coverage/src/filters/filter-types.ts.html +484 -0
- package/coverage/src/filters/index.html +131 -0
- package/coverage/src/index.html +176 -0
- package/coverage/src/index.ts.html +103 -0
- package/coverage/src/js-lib/JsToSqlParser.ts.html +736 -0
- package/coverage/src/js-lib/ParseContext.ts.html +532 -0
- package/coverage/src/js-lib/db/azuresql/AzureSqlCallExpressionVisitor.ts.html +196 -0
- package/coverage/src/js-lib/db/azuresql/index.html +116 -0
- package/coverage/src/js-lib/db/base/ArrayExpressionVisitor.ts.html +133 -0
- package/coverage/src/js-lib/db/base/AssignmentExpressionVisitor.ts.html +187 -0
- package/coverage/src/js-lib/db/base/BinaryExpressionVisitor.ts.html +223 -0
- package/coverage/src/js-lib/db/base/CallExpressionVisitor.ts.html +5479 -0
- package/coverage/src/js-lib/db/base/IdentifierVisitor.ts.html +283 -0
- package/coverage/src/js-lib/db/base/LiteralVisitor.ts.html +199 -0
- package/coverage/src/js-lib/db/base/MemberExpressionVisitor.ts.html +193 -0
- package/coverage/src/js-lib/db/base/ProgramVisitor.ts.html +139 -0
- package/coverage/src/js-lib/db/base/UnaryExpressionVisitor.ts.html +181 -0
- package/coverage/src/js-lib/db/base/VisitorInterface.ts.html +103 -0
- package/coverage/src/js-lib/db/base/index.html +251 -0
- package/coverage/src/js-lib/db/bigquery/BigQueryCallExpressionVisitor.ts.html +1747 -0
- package/coverage/src/js-lib/db/bigquery/index.html +116 -0
- package/coverage/src/js-lib/db/commonTransforms.ts.html +2074 -0
- package/coverage/src/js-lib/db/databricks/DatabricksCallExpressionVisitor.ts.html +1303 -0
- package/coverage/src/js-lib/db/databricks/index.html +116 -0
- package/coverage/src/js-lib/db/fabricsql/FabricSqlCallExpressionVisitor.ts.html +196 -0
- package/coverage/src/js-lib/db/fabricsql/index.html +116 -0
- package/coverage/src/js-lib/db/fabricwarehouse/FabricWarehouseCallExpressionVisitor.ts.html +292 -0
- package/coverage/src/js-lib/db/fabricwarehouse/index.html +116 -0
- package/coverage/src/js-lib/db/index.html +116 -0
- package/coverage/src/js-lib/db/postgresql/PostgreSqlCallExpressionVisitor.ts.html +985 -0
- package/coverage/src/js-lib/db/postgresql/index.html +116 -0
- package/coverage/src/js-lib/db/redshift/RedshiftCallExpressionVisitor.ts.html +685 -0
- package/coverage/src/js-lib/db/redshift/index.html +116 -0
- package/coverage/src/js-lib/db/sample/SampleCallExpressionVisitor.ts.html +196 -0
- package/coverage/src/js-lib/db/sample/index.html +116 -0
- package/coverage/src/js-lib/db/snowflake/SnowflakeCallExpressionVisitor.ts.html +1447 -0
- package/coverage/src/js-lib/db/snowflake/index.html +116 -0
- package/coverage/src/js-lib/db/validator/FormulaValidator.ts.html +4162 -0
- package/coverage/src/js-lib/db/validator/index.html +116 -0
- package/coverage/src/js-lib/index.html +131 -0
- package/coverage/src/js-lib/objects/BaseObject.ts.html +169 -0
- package/coverage/src/js-lib/objects/DateObject.ts.html +169 -0
- package/coverage/src/js-lib/objects/PctObject.ts.html +178 -0
- package/coverage/src/js-lib/objects/index.html +146 -0
- package/coverage/src/query-builder/PaginationBuilder.ts.html +142 -0
- package/coverage/src/query-builder/QueryBuilder.ts.html +3118 -0
- package/coverage/src/query-builder/SuperFilterBuilder.ts.html +1969 -0
- package/coverage/src/query-builder/index.html +146 -0
- package/coverage/src/runtime_var.ts.html +109 -0
- package/coverage/src/sql-lib/binary_expr.ts.html +133 -0
- package/coverage/src/sql-lib/case.ts.html +133 -0
- package/coverage/src/sql-lib/column.ts.html +139 -0
- package/coverage/src/sql-lib/else.ts.html +124 -0
- package/coverage/src/sql-lib/function.ts.html +112 -0
- package/coverage/src/sql-lib/index.html +251 -0
- package/coverage/src/sql-lib/join.ts.html +127 -0
- package/coverage/src/sql-lib/literal.ts.html +130 -0
- package/coverage/src/sql-lib/select.ts.html +547 -0
- package/coverage/src/sql-lib/unary_expr.ts.html +112 -0
- package/coverage/src/sql-lib/when.ts.html +130 -0
- package/coverage/src/sql_query_gen.ts.html +535 -0
- package/coverage/src/superFilter/DateFilterFactory.ts.html +625 -0
- package/coverage/src/superFilter/dateFunction.ts.html +193 -0
- package/coverage/src/superFilter/index.html +131 -0
- package/coverage/src/utils.ts.html +571 -0
- package/dist/index.cjs +8440 -0
- package/dist/index.d.cts +927 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.ts +927 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8387 -0
- package/dist/index.js.map +1 -0
- package/eslint.config.js +4 -0
- package/jest.config.ts +44 -0
- package/package.json +45 -0
- package/src/constants.ts +247 -0
- package/src/epm-query-builder/EpmQueryBuilder.ts +27 -0
- package/src/epm-query-builder/base/BaseAdvancedAggregations.ts +161 -0
- package/src/epm-query-builder/base/BaseAnalyticalFunctions.ts +203 -0
- package/src/epm-query-builder/base/BaseCTEGenerator.ts +458 -0
- package/src/epm-query-builder/base/BaseCountQueryBuilder.ts +105 -0
- package/src/epm-query-builder/base/BaseMeasureBuilder.ts +87 -0
- package/src/epm-query-builder/base/BaseOrderBuilder.ts +195 -0
- package/src/epm-query-builder/base/BasePaginationBuilder.ts +93 -0
- package/src/epm-query-builder/base/BaseQueryBuilder.ts +51 -0
- package/src/epm-query-builder/base/BaseRollupBuilder.ts +149 -0
- package/src/epm-query-builder/base/BaseSqlBuilder.ts +172 -0
- package/src/epm-query-builder/base/BaseSuperFilterBuilder.ts +627 -0
- package/src/epm-query-builder/base/BaseUtilities.ts +571 -0
- package/src/epm-query-builder/base/ColumnRefUtils.ts +42 -0
- package/src/epm-query-builder/base/RelationshipResolver.ts +207 -0
- package/src/epm-query-builder/base/SharedFilterBuilder.ts +544 -0
- package/src/epm-query-builder/constants/Aggregations.ts +16 -0
- package/src/epm-query-builder/constants/Database.ts +6 -0
- package/src/epm-query-builder/constants/Source.ts +7 -0
- package/src/epm-query-builder/dialects/duckdb/DuckDbAdvancedAggregations.ts +67 -0
- package/src/epm-query-builder/dialects/duckdb/DuckDbJoinBuilder.ts +65 -0
- package/src/epm-query-builder/dialects/duckdb/DuckDbMeasureBuilder.ts +626 -0
- package/src/epm-query-builder/dialects/duckdb/DuckDbOrderBuilder.ts +228 -0
- package/src/epm-query-builder/dialects/duckdb/DuckDbPaginationBuilder.ts +186 -0
- package/src/epm-query-builder/dialects/duckdb/DuckDbQueryBuilder.ts +853 -0
- package/src/epm-query-builder/dialects/duckdb/DuckDbRollupBuilder.ts +131 -0
- package/src/epm-query-builder/dialects/duckdb/DuckDbSuperFilterBuilder.ts +370 -0
- package/src/epm-query-builder/errors/QueryBuilderErrors.ts +65 -0
- package/src/epm-query-builder/interfaces/IDatabaseQueryBuilder.ts +5 -0
- package/src/epm-query-builder/interfaces/index.ts +1 -0
- package/src/epm-query-builder/types/query-builder-types.d.ts +289 -0
- package/src/epm-query-builder/utils/format.ts +22 -0
- package/src/epm-query-builder/utils/sql.ts +54 -0
- package/src/epm-query-builder/utils/validation.ts +13 -0
- package/src/epm-query-builder/validation/QueryOptionsValidator.ts +182 -0
- package/src/epm-query-builder/validation/SqlQueryValidator.ts +130 -0
- package/src/filters/FilterConditionBuilder.ts +114 -0
- package/src/filters/filter-types.ts +133 -0
- package/src/index.ts +10 -0
- package/src/js-lib/JsToSqlParser.ts +217 -0
- package/src/js-lib/ParseContext.ts +149 -0
- package/src/js-lib/db/base/ArrayExpressionVisitor.ts +16 -0
- package/src/js-lib/db/base/AssignmentExpressionVisitor.ts +34 -0
- package/src/js-lib/db/base/BinaryExpressionVisitor.ts +46 -0
- package/src/js-lib/db/base/CallExpressionVisitor.ts +1798 -0
- package/src/js-lib/db/base/IdentifierVisitor.ts +66 -0
- package/src/js-lib/db/base/LiteralVisitor.ts +38 -0
- package/src/js-lib/db/base/MemberExpressionVisitor.ts +36 -0
- package/src/js-lib/db/base/ProgramVisitor.ts +18 -0
- package/src/js-lib/db/base/UnaryExpressionVisitor.ts +32 -0
- package/src/js-lib/db/base/VisitorInterface.ts +6 -0
- package/src/js-lib/db/validator/FormulaValidator.ts +1235 -0
- package/src/js-lib/objects/BaseObject.ts +28 -0
- package/src/js-lib/objects/DateObject.ts +28 -0
- package/src/js-lib/objects/PctObject.ts +31 -0
- package/src/query-builder/PaginationBuilder.ts +19 -0
- package/src/query-builder/QueryBuilder.ts +1035 -0
- package/src/query-builder/SuperFilterBuilder.ts +628 -0
- package/src/runtime_var.ts +8 -0
- package/src/sql-lib/binary_expr.ts +16 -0
- package/src/sql-lib/case.ts +16 -0
- package/src/sql-lib/column.ts +18 -0
- package/src/sql-lib/else.ts +13 -0
- package/src/sql-lib/function.ts +9 -0
- package/src/sql-lib/join.ts +14 -0
- package/src/sql-lib/literal.ts +15 -0
- package/src/sql-lib/select.ts +154 -0
- package/src/sql-lib/unary_expr.ts +9 -0
- package/src/sql-lib/when.ts +15 -0
- package/src/sql-types.d.ts +565 -0
- package/src/sql_query_gen.ts +150 -0
- package/src/superFilter/DateFilterFactory.ts +180 -0
- package/src/superFilter/dateFunction.ts +36 -0
- package/src/utils.ts +354 -0
- package/test-output/report/junit.xml +329 -0
- package/tests/JsToSqlParser.test.ts +163 -0
- package/tests/QueryBuilder.test.ts +1320 -0
- package/tests/js-lib/CallExpressionVisitor.test.ts +820 -0
- package/tests/mocks/MockQueryResolver.ts +14 -0
- package/tests/sanity.test.ts +146 -0
- package/tests/sql-lib/binary_expr.test.ts +75 -0
- package/tests/sql-lib/case.test.ts +117 -0
- package/tests/sql-lib/column.test.ts +87 -0
- package/tests/sql-lib/else.test.ts +56 -0
- package/tests/sql-lib/function.test.ts +96 -0
- package/tests/sql-lib/literal.test.ts +75 -0
- package/tests/sql-lib/select.test.ts +245 -0
- package/tests/sql-lib/unary_expr.test.ts +32 -0
- package/tests/utils.test.ts +13 -0
- package/tsconfig.json +24 -0
- package/tsdown.config.ts +23 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
> dsl-to-sql@1.0.0-fabric-1p.1 build /Users/HarishkumarS/Documents/Fabric/epm-backend/packages/dsl-to-sql
|
|
4
|
+
> tsdown
|
|
5
|
+
|
|
6
|
+
[34mℹ[39m tsdown [2mv0.15.12[22m powered by rolldown [2mv1.0.0-beta.45[22m
|
|
7
|
+
[34mℹ[39m Using tsdown config: [4m/Users/HarishkumarS/Documents/Fabric/epm-backend/packages/dsl-to-sql/tsdown.config.ts[24m
|
|
8
|
+
[34mℹ[39m Build start
|
|
9
|
+
[34mℹ[39m Cleaning 7 files
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
|
|
2
|
+
> dsl-to-sql@1.0.0-fabric-1p.3 lint /Users/HarishkumarS/Documents/Fabric/epm-backend/packages/dsl-to-sql
|
|
3
|
+
> eslint src/ --max-warnings 2337
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
/Users/HarishkumarS/Documents/Fabric/epm-backend/packages/dsl-to-sql/src/filters/filter-types.ts
|
|
7
|
+
10:13 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
8
|
+
19:13 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
9
|
+
20:10 warning Array type using 'Array<Rule>' is forbidden. Use 'Rule[]' instead @typescript-eslint/array-type
|
|
10
|
+
25:13 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
11
|
+
26:10 warning Array type using 'Array<T>' is forbidden. Use 'T[]' instead @typescript-eslint/array-type
|
|
12
|
+
57:13 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
13
|
+
91:13 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
14
|
+
101:13 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
15
|
+
|
|
16
|
+
/Users/HarishkumarS/Documents/Fabric/epm-backend/packages/dsl-to-sql/src/js-lib/JsToSqlParser.ts
|
|
17
|
+
18:13 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
18
|
+
34:13 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
19
|
+
|
|
20
|
+
/Users/HarishkumarS/Documents/Fabric/epm-backend/packages/dsl-to-sql/src/js-lib/ParseContext.ts
|
|
21
|
+
35:13 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
22
|
+
41:13 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
23
|
+
46:13 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
24
|
+
50:13 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
25
|
+
66:13 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
26
|
+
75:3 warning Type number trivially inferred from a number literal, remove type annotation @typescript-eslint/no-inferrable-types
|
|
27
|
+
78:3 warning Type boolean trivially inferred from a boolean literal, remove type annotation @typescript-eslint/no-inferrable-types
|
|
28
|
+
87:3 warning Type boolean trivially inferred from a boolean literal, remove type annotation @typescript-eslint/no-inferrable-types
|
|
29
|
+
|
|
30
|
+
/Users/HarishkumarS/Documents/Fabric/epm-backend/packages/dsl-to-sql/src/query-builder/QueryBuilder.ts
|
|
31
|
+
35:13 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
32
|
+
37:13 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
33
|
+
46:13 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
34
|
+
53:13 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
35
|
+
55:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
36
|
+
75:6 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
37
|
+
87:6 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
38
|
+
93:13 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
39
|
+
98:6 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
40
|
+
109:6 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
41
|
+
379:59 warning 'databaseDetails' is assigned a value but never used @typescript-eslint/no-unused-vars
|
|
42
|
+
603:5 warning Type boolean trivially inferred from a boolean literal, remove type annotation @typescript-eslint/no-inferrable-types
|
|
43
|
+
|
|
44
|
+
/Users/HarishkumarS/Documents/Fabric/epm-backend/packages/dsl-to-sql/src/query-builder/SuperFilterBuilder.ts
|
|
45
|
+
75:7 warning 'SUPER_FILTER_NUMERIC_SUPPORTED_DATA_TYPES' is assigned a value but never used @typescript-eslint/no-unused-vars
|
|
46
|
+
93:28 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
47
|
+
103:22 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
48
|
+
104:5 warning Type boolean trivially inferred from a boolean literal, remove type annotation @typescript-eslint/no-inferrable-types
|
|
49
|
+
148:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
50
|
+
184:40 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
51
|
+
503:83 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
52
|
+
|
|
53
|
+
/Users/HarishkumarS/Documents/Fabric/epm-backend/packages/dsl-to-sql/src/sql-lib/else.ts
|
|
54
|
+
3:13 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
55
|
+
|
|
56
|
+
/Users/HarishkumarS/Documents/Fabric/epm-backend/packages/dsl-to-sql/src/sql-lib/select.ts
|
|
57
|
+
16:3 warning 'ExpressionValue' is defined but never used @typescript-eslint/no-unused-vars
|
|
58
|
+
|
|
59
|
+
/Users/HarishkumarS/Documents/Fabric/epm-backend/packages/dsl-to-sql/src/sql-lib/when.ts
|
|
60
|
+
3:13 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
61
|
+
|
|
62
|
+
/Users/HarishkumarS/Documents/Fabric/epm-backend/packages/dsl-to-sql/src/sql-types.d.ts
|
|
63
|
+
78:13 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
64
|
+
145:9 warning Array type using 'Array<T>' is forbidden. Use 'T[]' instead @typescript-eslint/array-type
|
|
65
|
+
179:13 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
66
|
+
204:13 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
67
|
+
206:13 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
68
|
+
208:13 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
69
|
+
219:13 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
70
|
+
239:13 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
71
|
+
252:13 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
72
|
+
261:13 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
73
|
+
266:13 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
74
|
+
310:10 warning Array type using 'Array<T>' is forbidden. Use 'T[]' instead @typescript-eslint/array-type
|
|
75
|
+
318:9 warning Array type using 'Array<T>' is forbidden. Use 'T[]' instead @typescript-eslint/array-type
|
|
76
|
+
341:6 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
77
|
+
348:6 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
78
|
+
354:6 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
79
|
+
362:6 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
80
|
+
367:6 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
81
|
+
371:6 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
82
|
+
379:6 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
83
|
+
399:6 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
84
|
+
404:6 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
85
|
+
410:6 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
86
|
+
419:6 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
87
|
+
433:6 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
88
|
+
435:6 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
89
|
+
445:6 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
90
|
+
456:6 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
91
|
+
466:6 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
92
|
+
|
|
93
|
+
/Users/HarishkumarS/Documents/Fabric/epm-backend/packages/dsl-to-sql/src/sql_query_gen.ts
|
|
94
|
+
27:7 warning Unexpected lexical declaration in case block no-case-declarations
|
|
95
|
+
30:7 warning Unexpected lexical declaration in case block no-case-declarations
|
|
96
|
+
33:7 warning Unexpected lexical declaration in case block no-case-declarations
|
|
97
|
+
36:7 warning Unexpected lexical declaration in case block no-case-declarations
|
|
98
|
+
39:7 warning Unexpected lexical declaration in case block no-case-declarations
|
|
99
|
+
45:7 warning Unexpected lexical declaration in case block no-case-declarations
|
|
100
|
+
65:7 warning Unexpected lexical declaration in case block no-case-declarations
|
|
101
|
+
66:7 warning Unexpected lexical declaration in case block no-case-declarations
|
|
102
|
+
72:7 warning Unexpected lexical declaration in case block no-case-declarations
|
|
103
|
+
75:7 warning Unexpected lexical declaration in case block no-case-declarations
|
|
104
|
+
76:7 warning Unexpected lexical declaration in case block no-case-declarations
|
|
105
|
+
77:7 warning Unexpected lexical declaration in case block no-case-declarations
|
|
106
|
+
78:7 warning Unexpected lexical declaration in case block no-case-declarations
|
|
107
|
+
|
|
108
|
+
/Users/HarishkumarS/Documents/Fabric/epm-backend/packages/dsl-to-sql/src/superFilter/DateFilterFactory.ts
|
|
109
|
+
6:6 warning Use an `interface` instead of a `type` @typescript-eslint/consistent-type-definitions
|
|
110
|
+
169:9 warning Unexpected lexical declaration in case block no-case-declarations
|
|
111
|
+
170:9 warning Unexpected lexical declaration in case block no-case-declarations
|
|
112
|
+
|
|
113
|
+
/Users/HarishkumarS/Documents/Fabric/epm-backend/packages/dsl-to-sql/src/superFilter/dateFunction.ts
|
|
114
|
+
19:20 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
115
|
+
19:33 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
116
|
+
30:24 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
117
|
+
|
|
118
|
+
/Users/HarishkumarS/Documents/Fabric/epm-backend/packages/dsl-to-sql/src/utils.ts
|
|
119
|
+
78:78 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
120
|
+
96:78 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
121
|
+
111:71 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
122
|
+
343:30 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
123
|
+
|
|
124
|
+
✖ 92 problems (0 errors, 92 warnings)
|
|
125
|
+
0 errors and 61 warnings potentially fixable with the `--fix` option.
|
|
126
|
+
|
package/README.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# DSL-to-SQL
|
|
2
|
+
|
|
3
|
+
Transform JavaScript expressions into optimized SQL queries with multi-dialect support.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Install
|
|
9
|
+
pnpm add dsl-to-sql
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { JsToSqlParser } from './src/js-lib/JsToSqlParser';
|
|
16
|
+
|
|
17
|
+
const parser = new JsToSqlParser();
|
|
18
|
+
const sql = parser.parse('a + b * 2');
|
|
19
|
+
// Outputs: (a + (b * 2))
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Supported Databases
|
|
23
|
+
|
|
24
|
+
- Fabric SQL
|
|
25
|
+
- Azure SQL
|
|
26
|
+
|
|
27
|
+
## Development
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# Install dependencies
|
|
31
|
+
pnpm install
|
|
32
|
+
|
|
33
|
+
# Build
|
|
34
|
+
pnpm build
|
|
35
|
+
|
|
36
|
+
# Test
|
|
37
|
+
pnpm test
|
|
38
|
+
|
|
39
|
+
# Run
|
|
40
|
+
pnpm dev
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## License
|
|
44
|
+
|
|
45
|
+
MIT
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
body, html {
|
|
2
|
+
margin:0; padding: 0;
|
|
3
|
+
height: 100%;
|
|
4
|
+
}
|
|
5
|
+
body {
|
|
6
|
+
font-family: Helvetica Neue, Helvetica, Arial;
|
|
7
|
+
font-size: 14px;
|
|
8
|
+
color:#333;
|
|
9
|
+
}
|
|
10
|
+
.small { font-size: 12px; }
|
|
11
|
+
*, *:after, *:before {
|
|
12
|
+
-webkit-box-sizing:border-box;
|
|
13
|
+
-moz-box-sizing:border-box;
|
|
14
|
+
box-sizing:border-box;
|
|
15
|
+
}
|
|
16
|
+
h1 { font-size: 20px; margin: 0;}
|
|
17
|
+
h2 { font-size: 14px; }
|
|
18
|
+
pre {
|
|
19
|
+
font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
20
|
+
margin: 0;
|
|
21
|
+
padding: 0;
|
|
22
|
+
-moz-tab-size: 2;
|
|
23
|
+
-o-tab-size: 2;
|
|
24
|
+
tab-size: 2;
|
|
25
|
+
}
|
|
26
|
+
a { color:#0074D9; text-decoration:none; }
|
|
27
|
+
a:hover { text-decoration:underline; }
|
|
28
|
+
.strong { font-weight: bold; }
|
|
29
|
+
.space-top1 { padding: 10px 0 0 0; }
|
|
30
|
+
.pad2y { padding: 20px 0; }
|
|
31
|
+
.pad1y { padding: 10px 0; }
|
|
32
|
+
.pad2x { padding: 0 20px; }
|
|
33
|
+
.pad2 { padding: 20px; }
|
|
34
|
+
.pad1 { padding: 10px; }
|
|
35
|
+
.space-left2 { padding-left:55px; }
|
|
36
|
+
.space-right2 { padding-right:20px; }
|
|
37
|
+
.center { text-align:center; }
|
|
38
|
+
.clearfix { display:block; }
|
|
39
|
+
.clearfix:after {
|
|
40
|
+
content:'';
|
|
41
|
+
display:block;
|
|
42
|
+
height:0;
|
|
43
|
+
clear:both;
|
|
44
|
+
visibility:hidden;
|
|
45
|
+
}
|
|
46
|
+
.fl { float: left; }
|
|
47
|
+
@media only screen and (max-width:640px) {
|
|
48
|
+
.col3 { width:100%; max-width:100%; }
|
|
49
|
+
.hide-mobile { display:none!important; }
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.quiet {
|
|
53
|
+
color: #7f7f7f;
|
|
54
|
+
color: rgba(0,0,0,0.5);
|
|
55
|
+
}
|
|
56
|
+
.quiet a { opacity: 0.7; }
|
|
57
|
+
|
|
58
|
+
.fraction {
|
|
59
|
+
font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
|
|
60
|
+
font-size: 10px;
|
|
61
|
+
color: #555;
|
|
62
|
+
background: #E8E8E8;
|
|
63
|
+
padding: 4px 5px;
|
|
64
|
+
border-radius: 3px;
|
|
65
|
+
vertical-align: middle;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
div.path a:link, div.path a:visited { color: #333; }
|
|
69
|
+
table.coverage {
|
|
70
|
+
border-collapse: collapse;
|
|
71
|
+
margin: 10px 0 0 0;
|
|
72
|
+
padding: 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
table.coverage td {
|
|
76
|
+
margin: 0;
|
|
77
|
+
padding: 0;
|
|
78
|
+
vertical-align: top;
|
|
79
|
+
}
|
|
80
|
+
table.coverage td.line-count {
|
|
81
|
+
text-align: right;
|
|
82
|
+
padding: 0 5px 0 20px;
|
|
83
|
+
}
|
|
84
|
+
table.coverage td.line-coverage {
|
|
85
|
+
text-align: right;
|
|
86
|
+
padding-right: 10px;
|
|
87
|
+
min-width:20px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
table.coverage td span.cline-any {
|
|
91
|
+
display: inline-block;
|
|
92
|
+
padding: 0 5px;
|
|
93
|
+
width: 100%;
|
|
94
|
+
}
|
|
95
|
+
.missing-if-branch {
|
|
96
|
+
display: inline-block;
|
|
97
|
+
margin-right: 5px;
|
|
98
|
+
border-radius: 3px;
|
|
99
|
+
position: relative;
|
|
100
|
+
padding: 0 4px;
|
|
101
|
+
background: #333;
|
|
102
|
+
color: yellow;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.skip-if-branch {
|
|
106
|
+
display: none;
|
|
107
|
+
margin-right: 10px;
|
|
108
|
+
position: relative;
|
|
109
|
+
padding: 0 4px;
|
|
110
|
+
background: #ccc;
|
|
111
|
+
color: white;
|
|
112
|
+
}
|
|
113
|
+
.missing-if-branch .typ, .skip-if-branch .typ {
|
|
114
|
+
color: inherit !important;
|
|
115
|
+
}
|
|
116
|
+
.coverage-summary {
|
|
117
|
+
border-collapse: collapse;
|
|
118
|
+
width: 100%;
|
|
119
|
+
}
|
|
120
|
+
.coverage-summary tr { border-bottom: 1px solid #bbb; }
|
|
121
|
+
.keyline-all { border: 1px solid #ddd; }
|
|
122
|
+
.coverage-summary td, .coverage-summary th { padding: 10px; }
|
|
123
|
+
.coverage-summary tbody { border: 1px solid #bbb; }
|
|
124
|
+
.coverage-summary td { border-right: 1px solid #bbb; }
|
|
125
|
+
.coverage-summary td:last-child { border-right: none; }
|
|
126
|
+
.coverage-summary th {
|
|
127
|
+
text-align: left;
|
|
128
|
+
font-weight: normal;
|
|
129
|
+
white-space: nowrap;
|
|
130
|
+
}
|
|
131
|
+
.coverage-summary th.file { border-right: none !important; }
|
|
132
|
+
.coverage-summary th.pct { }
|
|
133
|
+
.coverage-summary th.pic,
|
|
134
|
+
.coverage-summary th.abs,
|
|
135
|
+
.coverage-summary td.pct,
|
|
136
|
+
.coverage-summary td.abs { text-align: right; }
|
|
137
|
+
.coverage-summary td.file { white-space: nowrap; }
|
|
138
|
+
.coverage-summary td.pic { min-width: 120px !important; }
|
|
139
|
+
.coverage-summary tfoot td { }
|
|
140
|
+
|
|
141
|
+
.coverage-summary .sorter {
|
|
142
|
+
height: 10px;
|
|
143
|
+
width: 7px;
|
|
144
|
+
display: inline-block;
|
|
145
|
+
margin-left: 0.5em;
|
|
146
|
+
background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
|
|
147
|
+
}
|
|
148
|
+
.coverage-summary .sorted .sorter {
|
|
149
|
+
background-position: 0 -20px;
|
|
150
|
+
}
|
|
151
|
+
.coverage-summary .sorted-desc .sorter {
|
|
152
|
+
background-position: 0 -10px;
|
|
153
|
+
}
|
|
154
|
+
.status-line { height: 10px; }
|
|
155
|
+
/* yellow */
|
|
156
|
+
.cbranch-no { background: yellow !important; color: #111; }
|
|
157
|
+
/* dark red */
|
|
158
|
+
.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 }
|
|
159
|
+
.low .chart { border:1px solid #C21F39 }
|
|
160
|
+
.highlighted,
|
|
161
|
+
.highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no{
|
|
162
|
+
background: #C21F39 !important;
|
|
163
|
+
}
|
|
164
|
+
/* medium red */
|
|
165
|
+
.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE }
|
|
166
|
+
/* light red */
|
|
167
|
+
.low, .cline-no { background:#FCE1E5 }
|
|
168
|
+
/* light green */
|
|
169
|
+
.high, .cline-yes { background:rgb(230,245,208) }
|
|
170
|
+
/* medium green */
|
|
171
|
+
.cstat-yes { background:rgb(161,215,106) }
|
|
172
|
+
/* dark green */
|
|
173
|
+
.status-line.high, .high .cover-fill { background:rgb(77,146,33) }
|
|
174
|
+
.high .chart { border:1px solid rgb(77,146,33) }
|
|
175
|
+
/* dark yellow (gold) */
|
|
176
|
+
.status-line.medium, .medium .cover-fill { background: #f9cd0b; }
|
|
177
|
+
.medium .chart { border:1px solid #f9cd0b; }
|
|
178
|
+
/* light yellow */
|
|
179
|
+
.medium { background: #fff4c2; }
|
|
180
|
+
|
|
181
|
+
.cstat-skip { background: #ddd; color: #111; }
|
|
182
|
+
.fstat-skip { background: #ddd; color: #111 !important; }
|
|
183
|
+
.cbranch-skip { background: #ddd !important; color: #111; }
|
|
184
|
+
|
|
185
|
+
span.cline-neutral { background: #eaeaea; }
|
|
186
|
+
|
|
187
|
+
.coverage-summary td.empty {
|
|
188
|
+
opacity: .5;
|
|
189
|
+
padding-top: 4px;
|
|
190
|
+
padding-bottom: 4px;
|
|
191
|
+
line-height: 1;
|
|
192
|
+
color: #888;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.cover-fill, .cover-empty {
|
|
196
|
+
display:inline-block;
|
|
197
|
+
height: 12px;
|
|
198
|
+
}
|
|
199
|
+
.chart {
|
|
200
|
+
line-height: 0;
|
|
201
|
+
}
|
|
202
|
+
.cover-empty {
|
|
203
|
+
background: white;
|
|
204
|
+
}
|
|
205
|
+
.cover-full {
|
|
206
|
+
border-right: none !important;
|
|
207
|
+
}
|
|
208
|
+
pre.prettyprint {
|
|
209
|
+
border: none !important;
|
|
210
|
+
padding: 0 !important;
|
|
211
|
+
margin: 0 !important;
|
|
212
|
+
}
|
|
213
|
+
.com { color: #999 !important; }
|
|
214
|
+
.ignore-none { color: #999; font-weight: normal; }
|
|
215
|
+
|
|
216
|
+
.wrapper {
|
|
217
|
+
min-height: 100%;
|
|
218
|
+
height: auto !important;
|
|
219
|
+
height: 100%;
|
|
220
|
+
margin: 0 auto -48px;
|
|
221
|
+
}
|
|
222
|
+
.footer, .push {
|
|
223
|
+
height: 48px;
|
|
224
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
var jumpToCode = (function init() {
|
|
3
|
+
// Classes of code we would like to highlight in the file view
|
|
4
|
+
var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];
|
|
5
|
+
|
|
6
|
+
// Elements to highlight in the file listing view
|
|
7
|
+
var fileListingElements = ['td.pct.low'];
|
|
8
|
+
|
|
9
|
+
// We don't want to select elements that are direct descendants of another match
|
|
10
|
+
var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > `
|
|
11
|
+
|
|
12
|
+
// Selector that finds elements on the page to which we can jump
|
|
13
|
+
var selector =
|
|
14
|
+
fileListingElements.join(', ') +
|
|
15
|
+
', ' +
|
|
16
|
+
notSelector +
|
|
17
|
+
missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
|
|
18
|
+
|
|
19
|
+
// The NodeList of matching elements
|
|
20
|
+
var missingCoverageElements = document.querySelectorAll(selector);
|
|
21
|
+
|
|
22
|
+
var currentIndex;
|
|
23
|
+
|
|
24
|
+
function toggleClass(index) {
|
|
25
|
+
missingCoverageElements
|
|
26
|
+
.item(currentIndex)
|
|
27
|
+
.classList.remove('highlighted');
|
|
28
|
+
missingCoverageElements.item(index).classList.add('highlighted');
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function makeCurrent(index) {
|
|
32
|
+
toggleClass(index);
|
|
33
|
+
currentIndex = index;
|
|
34
|
+
missingCoverageElements.item(index).scrollIntoView({
|
|
35
|
+
behavior: 'smooth',
|
|
36
|
+
block: 'center',
|
|
37
|
+
inline: 'center'
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function goToPrevious() {
|
|
42
|
+
var nextIndex = 0;
|
|
43
|
+
if (typeof currentIndex !== 'number' || currentIndex === 0) {
|
|
44
|
+
nextIndex = missingCoverageElements.length - 1;
|
|
45
|
+
} else if (missingCoverageElements.length > 1) {
|
|
46
|
+
nextIndex = currentIndex - 1;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
makeCurrent(nextIndex);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function goToNext() {
|
|
53
|
+
var nextIndex = 0;
|
|
54
|
+
|
|
55
|
+
if (
|
|
56
|
+
typeof currentIndex === 'number' &&
|
|
57
|
+
currentIndex < missingCoverageElements.length - 1
|
|
58
|
+
) {
|
|
59
|
+
nextIndex = currentIndex + 1;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
makeCurrent(nextIndex);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return function jump(event) {
|
|
66
|
+
if (
|
|
67
|
+
document.getElementById('fileSearch') === document.activeElement &&
|
|
68
|
+
document.activeElement != null
|
|
69
|
+
) {
|
|
70
|
+
// if we're currently focused on the search input, we don't want to navigate
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
switch (event.which) {
|
|
75
|
+
case 78: // n
|
|
76
|
+
case 74: // j
|
|
77
|
+
goToNext();
|
|
78
|
+
break;
|
|
79
|
+
case 66: // b
|
|
80
|
+
case 75: // k
|
|
81
|
+
case 80: // p
|
|
82
|
+
goToPrevious();
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
})();
|
|
87
|
+
window.addEventListener('keydown', jumpToCode);
|
|
Binary file
|