taon-type-sql 21.0.21 → 21.0.23

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 (141) hide show
  1. package/browser/package.json +1 -1
  2. package/browser-prod/package.json +1 -1
  3. package/lib/build-info._auto-generated_.d.ts +1 -1
  4. package/lib/build-info._auto-generated_.js +1 -1
  5. package/lib/package.json +1 -1
  6. package/lib-prod/build-info._auto-generated_.js +14 -30
  7. package/lib-prod/builder/column/basic-column.js +12 -14
  8. package/lib-prod/builder/column/boolean-column.js +13 -14
  9. package/lib-prod/builder/column/comparable-column.js +41 -41
  10. package/lib-prod/builder/column/date-column.js +13 -14
  11. package/lib-prod/builder/column/number-column.js +18 -19
  12. package/lib-prod/builder/column/query-column.js +22 -24
  13. package/lib-prod/builder/column/string-column.js +35 -36
  14. package/lib-prod/builder/column/value-column.js +27 -28
  15. package/lib-prod/builder/condition/query-column-condition.js +21 -22
  16. package/lib-prod/builder/condition/query-condition-chain.js +32 -33
  17. package/lib-prod/builder/condition/query-condition.js +4 -5
  18. package/lib-prod/builder/condition/query-join-condition.js +21 -22
  19. package/lib-prod/builder/helpers/generics-helper.js +3 -5
  20. package/lib-prod/builder/helpers/internal-types.js +0 -4
  21. package/lib-prod/builder/join/joined-tables-chain.js +12 -16
  22. package/lib-prod/builder/join/joined-tables.js +20 -23
  23. package/lib-prod/builder/other/query-ordering.js +18 -19
  24. package/lib-prod/builder/query/select-query.js +49 -52
  25. package/lib-prod/builder/query/table-condition-query.js +25 -29
  26. package/lib-prod/builder/query/table-query.js +52 -58
  27. package/lib-prod/builder/query-source.js +16 -20
  28. package/lib-prod/builder/query-table.js +25 -26
  29. package/lib-prod/client/mysql.js +9 -10
  30. package/lib-prod/client/pg.js +9 -10
  31. package/lib-prod/client/query-processor.js +39 -68
  32. package/lib-prod/converter/param-converter.js +19 -27
  33. package/lib-prod/converter/parameterized-converter.js +13 -14
  34. package/lib-prod/converter/query-converter.js +243 -259
  35. package/lib-prod/converter/result-converter.js +61 -73
  36. package/lib-prod/converter/sql-converter.js +6 -7
  37. package/lib-prod/converter/type-converter.js +24 -35
  38. package/lib-prod/converter/types.js +0 -3
  39. package/lib-prod/env/env.angular-node-app.js +130 -71
  40. package/lib-prod/env/env.docs-webapp.js +130 -71
  41. package/lib-prod/env/env.electron-app.js +130 -71
  42. package/lib-prod/env/env.mobile-app.js +130 -71
  43. package/lib-prod/env/env.npm-lib-and-cli-tool.js +130 -71
  44. package/lib-prod/env/env.vscode-plugin.js +130 -71
  45. package/lib-prod/env/index.js +6 -23
  46. package/lib-prod/index._auto-generated_.js +0 -6
  47. package/lib-prod/index.js +46 -48
  48. package/lib-prod/migrations/index.js +1 -19
  49. package/lib-prod/migrations/migrations_index._auto-generated_.js +0 -4
  50. package/lib-prod/package.json +1 -1
  51. package/package.json +1 -1
  52. package/websql/package.json +1 -1
  53. package/websql-prod/package.json +1 -1
  54. package/lib-prod/build-info._auto-generated_.d.ts +0 -24
  55. package/lib-prod/build-info._auto-generated_.js.map +0 -1
  56. package/lib-prod/builder/column/basic-column.d.ts +0 -8
  57. package/lib-prod/builder/column/basic-column.js.map +0 -1
  58. package/lib-prod/builder/column/boolean-column.d.ts +0 -9
  59. package/lib-prod/builder/column/boolean-column.js.map +0 -1
  60. package/lib-prod/builder/column/comparable-column.d.ts +0 -18
  61. package/lib-prod/builder/column/comparable-column.js.map +0 -1
  62. package/lib-prod/builder/column/date-column.d.ts +0 -9
  63. package/lib-prod/builder/column/date-column.js.map +0 -1
  64. package/lib-prod/builder/column/number-column.d.ts +0 -10
  65. package/lib-prod/builder/column/number-column.js.map +0 -1
  66. package/lib-prod/builder/column/query-column.d.ts +0 -18
  67. package/lib-prod/builder/column/query-column.js.map +0 -1
  68. package/lib-prod/builder/column/string-column.d.ts +0 -17
  69. package/lib-prod/builder/column/string-column.js.map +0 -1
  70. package/lib-prod/builder/column/value-column.d.ts +0 -15
  71. package/lib-prod/builder/column/value-column.js.map +0 -1
  72. package/lib-prod/builder/condition/query-column-condition.d.ts +0 -13
  73. package/lib-prod/builder/condition/query-column-condition.js.map +0 -1
  74. package/lib-prod/builder/condition/query-condition-chain.d.ts +0 -17
  75. package/lib-prod/builder/condition/query-condition-chain.js.map +0 -1
  76. package/lib-prod/builder/condition/query-condition.d.ts +0 -7
  77. package/lib-prod/builder/condition/query-condition.js.map +0 -1
  78. package/lib-prod/builder/condition/query-join-condition.d.ts +0 -12
  79. package/lib-prod/builder/condition/query-join-condition.js.map +0 -1
  80. package/lib-prod/builder/helpers/generics-helper.d.ts +0 -2
  81. package/lib-prod/builder/helpers/generics-helper.js.map +0 -1
  82. package/lib-prod/builder/helpers/internal-types.d.ts +0 -15
  83. package/lib-prod/builder/helpers/internal-types.js.map +0 -1
  84. package/lib-prod/builder/join/joined-tables-chain.d.ts +0 -11
  85. package/lib-prod/builder/join/joined-tables-chain.js.map +0 -1
  86. package/lib-prod/builder/join/joined-tables.d.ts +0 -12
  87. package/lib-prod/builder/join/joined-tables.js.map +0 -1
  88. package/lib-prod/builder/other/query-ordering.d.ts +0 -10
  89. package/lib-prod/builder/other/query-ordering.js.map +0 -1
  90. package/lib-prod/builder/query/select-query.d.ts +0 -29
  91. package/lib-prod/builder/query/select-query.js.map +0 -1
  92. package/lib-prod/builder/query/table-condition-query.d.ts +0 -16
  93. package/lib-prod/builder/query/table-condition-query.js.map +0 -1
  94. package/lib-prod/builder/query/table-query.d.ts +0 -23
  95. package/lib-prod/builder/query/table-query.js.map +0 -1
  96. package/lib-prod/builder/query-source.d.ts +0 -14
  97. package/lib-prod/builder/query-source.js.map +0 -1
  98. package/lib-prod/builder/query-table.d.ts +0 -15
  99. package/lib-prod/builder/query-table.js.map +0 -1
  100. package/lib-prod/client/mysql.d.ts +0 -5
  101. package/lib-prod/client/mysql.js.map +0 -1
  102. package/lib-prod/client/pg.d.ts +0 -5
  103. package/lib-prod/client/pg.js.map +0 -1
  104. package/lib-prod/client/query-processor.d.ts +0 -10
  105. package/lib-prod/client/query-processor.js.map +0 -1
  106. package/lib-prod/converter/param-converter.d.ts +0 -2
  107. package/lib-prod/converter/param-converter.js.map +0 -1
  108. package/lib-prod/converter/parameterized-converter.d.ts +0 -5
  109. package/lib-prod/converter/parameterized-converter.js.map +0 -1
  110. package/lib-prod/converter/query-converter.d.ts +0 -2
  111. package/lib-prod/converter/query-converter.js.map +0 -1
  112. package/lib-prod/converter/result-converter.d.ts +0 -2
  113. package/lib-prod/converter/result-converter.js.map +0 -1
  114. package/lib-prod/converter/sql-converter.d.ts +0 -2
  115. package/lib-prod/converter/sql-converter.js.map +0 -1
  116. package/lib-prod/converter/type-converter.d.ts +0 -4
  117. package/lib-prod/converter/type-converter.js.map +0 -1
  118. package/lib-prod/converter/types.d.ts +0 -5
  119. package/lib-prod/converter/types.js.map +0 -1
  120. package/lib-prod/env/env.angular-node-app.d.ts +0 -64
  121. package/lib-prod/env/env.angular-node-app.js.map +0 -1
  122. package/lib-prod/env/env.docs-webapp.d.ts +0 -64
  123. package/lib-prod/env/env.docs-webapp.js.map +0 -1
  124. package/lib-prod/env/env.electron-app.d.ts +0 -64
  125. package/lib-prod/env/env.electron-app.js.map +0 -1
  126. package/lib-prod/env/env.mobile-app.d.ts +0 -64
  127. package/lib-prod/env/env.mobile-app.js.map +0 -1
  128. package/lib-prod/env/env.npm-lib-and-cli-tool.d.ts +0 -64
  129. package/lib-prod/env/env.npm-lib-and-cli-tool.js.map +0 -1
  130. package/lib-prod/env/env.vscode-plugin.d.ts +0 -64
  131. package/lib-prod/env/env.vscode-plugin.js.map +0 -1
  132. package/lib-prod/env/index.d.ts +0 -6
  133. package/lib-prod/env/index.js.map +0 -1
  134. package/lib-prod/index._auto-generated_.d.ts +0 -0
  135. package/lib-prod/index._auto-generated_.js.map +0 -1
  136. package/lib-prod/index.d.ts +0 -25
  137. package/lib-prod/index.js.map +0 -1
  138. package/lib-prod/migrations/index.d.ts +0 -1
  139. package/lib-prod/migrations/index.js.map +0 -1
  140. package/lib-prod/migrations/migrations_index._auto-generated_.d.ts +0 -0
  141. package/lib-prod/migrations/migrations_index._auto-generated_.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taon-type-sql/browser",
3
- "version": "21.0.21",
3
+ "version": "21.0.23",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^21.0.0",
6
6
  "@angular/core": "^21.0.0"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taon-type-sql/browser-prod",
3
- "version": "21.0.21",
3
+ "version": "21.0.23",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^21.0.0",
6
6
  "@angular/core": "^21.0.0"
@@ -21,4 +21,4 @@ export declare const CURRENT_PACKAGE_TAON_VERSION = "v21";
21
21
  /**
22
22
  * Autogenerated by current cli tool. Use *tnp release* to bump version.
23
23
  */
24
- export declare const CURRENT_PACKAGE_VERSION = "21.0.21";
24
+ export declare const CURRENT_PACKAGE_VERSION = "21.0.23";
@@ -25,6 +25,6 @@ exports.CURRENT_PACKAGE_TAON_VERSION = 'v21';
25
25
  /**
26
26
  * Autogenerated by current cli tool. Use *tnp release* to bump version.
27
27
  */
28
- exports.CURRENT_PACKAGE_VERSION = '21.0.21';
28
+ exports.CURRENT_PACKAGE_VERSION = '21.0.23';
29
29
  // THIS FILE IS GENERATED - DO NOT MODIFY
30
30
  //# sourceMappingURL=build-info._auto-generated_.js.map
package/lib/package.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "taon-type-sql/lib",
3
- "version": "21.0.21"
3
+ "version": "21.0.23"
4
4
  }
@@ -1,30 +1,14 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CURRENT_PACKAGE_VERSION = exports.CURRENT_PACKAGE_TAON_VERSION = exports.PROJECT_NPM_NAME = exports.BUILD_BASE_HREF = exports.APP_ID = exports.BUILD_FRAMEWORK_CLI_NAME = void 0;
4
- // THIS FILE IS GENERATED - DO NOT MODIFY
5
- /**
6
- * Autogenerated by current cli tool
7
- */
8
- exports.BUILD_FRAMEWORK_CLI_NAME = 'tnp';
9
- /**
10
- * This value can be change in taon.jsonc (appId)
11
- */
12
- exports.APP_ID = 'com.domain.example.taon-type-sql';
13
- /**
14
- * Autogenerated by current cli tool
15
- */
16
- exports.BUILD_BASE_HREF = '';
17
- /**
18
- * This value can be change in taon.jsonc (overrideNpmName)
19
- */
20
- exports.PROJECT_NPM_NAME = 'taon-type-sql';
21
- /**
22
- * Taon version from you project taon.json
23
- */
24
- exports.CURRENT_PACKAGE_TAON_VERSION = 'v21';
25
- /**
26
- * Autogenerated by current cli tool. Use *tnp release* to bump version.
27
- */
28
- exports.CURRENT_PACKAGE_VERSION = '21.0.21';
29
- // THIS FILE IS GENERATED - DO NOT MODIFY
30
- //# sourceMappingURL=build-info._auto-generated_.js.map
1
+ const BUILD_FRAMEWORK_CLI_NAME = "tnp";
2
+ const APP_ID = "com.domain.example.taon-type-sql";
3
+ const BUILD_BASE_HREF = "";
4
+ const PROJECT_NPM_NAME = "taon-type-sql";
5
+ const CURRENT_PACKAGE_TAON_VERSION = "v21";
6
+ const CURRENT_PACKAGE_VERSION = "21.0.23";
7
+ export {
8
+ APP_ID,
9
+ BUILD_BASE_HREF,
10
+ BUILD_FRAMEWORK_CLI_NAME,
11
+ CURRENT_PACKAGE_TAON_VERSION,
12
+ CURRENT_PACKAGE_VERSION,
13
+ PROJECT_NPM_NAME
14
+ };
@@ -1,15 +1,13 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const query_column_1 = require("./query-column");
4
- const number_column_1 = require("./number-column");
5
- // This file is only needed because the QueryColumn can't implement its count method b. of circular dependencies
6
- class BasicColumn extends query_column_1.default {
7
- constructor(table, name, modifiers = []) {
8
- super(table, name, modifiers);
9
- }
10
- count() {
11
- return new number_column_1.default(this._table, this._name, this._modifiers.concat({ name: 'count' }));
12
- }
1
+ import QueryColumn from "./query-column";
2
+ import NumberColumn from "./number-column";
3
+ class BasicColumn extends QueryColumn {
4
+ constructor(table, name, modifiers = []) {
5
+ super(table, name, modifiers);
6
+ }
7
+ count() {
8
+ return new NumberColumn(this._table, this._name, this._modifiers.concat({ name: "count" }));
9
+ }
13
10
  }
14
- exports.default = BasicColumn;
15
- //# sourceMappingURL=basic-column.js.map
11
+ export {
12
+ BasicColumn as default
13
+ };
@@ -1,15 +1,14 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const number_column_1 = require("./number-column");
4
- const value_column_1 = require("./value-column");
5
- class BooleanColumn extends value_column_1.default {
6
- _type = 'boolean';
7
- constructor(table, name, modifiers = []) {
8
- super(table, name, modifiers);
9
- }
10
- count() {
11
- return new number_column_1.default(this._table, this._name, this._modifiers.concat({ name: 'count' }));
12
- }
1
+ import NumberColumn from "./number-column";
2
+ import ValueColumn from "./value-column";
3
+ class BooleanColumn extends ValueColumn {
4
+ _type = "boolean";
5
+ constructor(table, name, modifiers = []) {
6
+ super(table, name, modifiers);
7
+ }
8
+ count() {
9
+ return new NumberColumn(this._table, this._name, this._modifiers.concat({ name: "count" }));
10
+ }
13
11
  }
14
- exports.default = BooleanColumn;
15
- //# sourceMappingURL=boolean-column.js.map
12
+ export {
13
+ BooleanColumn as default
14
+ };
@@ -1,42 +1,42 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const query_column_condition_1 = require("../condition/query-column-condition");
4
- const value_column_1 = require("./value-column");
5
- class ComparableColumn extends value_column_1.default {
6
- constructor(table, name, modifiers = []) {
7
- super(table, name, modifiers);
8
- }
9
- lt(value) {
10
- return new query_column_condition_1.default(this, 'lt', value);
11
- }
12
- gt(value) {
13
- return new query_column_condition_1.default(this, 'gt', value);
14
- }
15
- lte(value) {
16
- return new query_column_condition_1.default(this, 'lte', value);
17
- }
18
- gte(value) {
19
- return new query_column_condition_1.default(this, 'gte', value);
20
- }
21
- in(values) {
22
- return new query_column_condition_1.default(this, 'in', ...values);
23
- }
24
- notIn(values) {
25
- return new query_column_condition_1.default(this, 'not-in', ...values);
26
- }
27
- between(value1, value2) {
28
- return new query_column_condition_1.default(this, 'between', value1, value2);
29
- }
30
- notBetween(value1, value2) {
31
- return new query_column_condition_1.default(this, 'not-between', value1, value2);
32
- }
33
- // min/max exists for text columns too, not just numeric and date
34
- min() {
35
- return new this.constructor(this._table, this._name, this._modifiers.concat({ name: 'min' }));
36
- }
37
- max() {
38
- return new this.constructor(this._table, this._name, this._modifiers.concat({ name: 'max' }));
39
- }
1
+ import QueryColumnCondition from "../condition/query-column-condition";
2
+ import ValueColumn from "./value-column";
3
+ class ComparableColumn extends ValueColumn {
4
+ constructor(table, name, modifiers = []) {
5
+ super(table, name, modifiers);
6
+ }
7
+ lt(value) {
8
+ return new QueryColumnCondition(this, "lt", value);
9
+ }
10
+ gt(value) {
11
+ return new QueryColumnCondition(this, "gt", value);
12
+ }
13
+ lte(value) {
14
+ return new QueryColumnCondition(this, "lte", value);
15
+ }
16
+ gte(value) {
17
+ return new QueryColumnCondition(this, "gte", value);
18
+ }
19
+ in(values) {
20
+ return new QueryColumnCondition(this, "in", ...values);
21
+ }
22
+ notIn(values) {
23
+ return new QueryColumnCondition(this, "not-in", ...values);
24
+ }
25
+ between(value1, value2) {
26
+ return new QueryColumnCondition(this, "between", value1, value2);
27
+ }
28
+ notBetween(value1, value2) {
29
+ return new QueryColumnCondition(this, "not-between", value1, value2);
30
+ }
31
+ // min/max exists for text columns too, not just numeric and date
32
+ min() {
33
+ return new this.constructor(this._table, this._name, this._modifiers.concat({ name: "min" }));
34
+ }
35
+ max() {
36
+ return new this.constructor(this._table, this._name, this._modifiers.concat({ name: "max" }));
37
+ }
40
38
  }
41
- exports.default = ComparableColumn;
42
- //# sourceMappingURL=comparable-column.js.map
39
+ var comparable_column_default = ComparableColumn;
40
+ export {
41
+ comparable_column_default as default
42
+ };
@@ -1,15 +1,14 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const comparable_column_1 = require("./comparable-column");
4
- const number_column_1 = require("./number-column");
5
- class DateColumn extends comparable_column_1.default {
6
- _type = 'date';
7
- constructor(table, name, modifiers = []) {
8
- super(table, name, modifiers);
9
- }
10
- count() {
11
- return new number_column_1.default(this._table, this._name, this._modifiers.concat({ name: 'count' }));
12
- }
1
+ import ComparableColumn from "./comparable-column";
2
+ import NumberColumn from "./number-column";
3
+ class DateColumn extends ComparableColumn {
4
+ _type = "date";
5
+ constructor(table, name, modifiers = []) {
6
+ super(table, name, modifiers);
7
+ }
8
+ count() {
9
+ return new NumberColumn(this._table, this._name, this._modifiers.concat({ name: "count" }));
10
+ }
13
11
  }
14
- exports.default = DateColumn;
15
- //# sourceMappingURL=date-column.js.map
12
+ export {
13
+ DateColumn as default
14
+ };
@@ -1,20 +1,19 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const comparable_column_1 = require("./comparable-column");
4
- class NumberColumn extends comparable_column_1.default {
5
- _type = 'number';
6
- constructor(table, name, modifiers = []) {
7
- super(table, name, modifiers);
8
- }
9
- count() {
10
- return new NumberColumn(this._table, this._name, this._modifiers.concat({ name: 'count' }));
11
- }
12
- sum() {
13
- return new NumberColumn(this._table, this._name, this._modifiers.concat({ name: 'sum' }));
14
- }
15
- avg() {
16
- return new NumberColumn(this._table, this._name, this._modifiers.concat({ name: 'avg' }));
17
- }
1
+ import ComparableColumn from "./comparable-column";
2
+ class NumberColumn extends ComparableColumn {
3
+ _type = "number";
4
+ constructor(table, name, modifiers = []) {
5
+ super(table, name, modifiers);
6
+ }
7
+ count() {
8
+ return new NumberColumn(this._table, this._name, this._modifiers.concat({ name: "count" }));
9
+ }
10
+ sum() {
11
+ return new NumberColumn(this._table, this._name, this._modifiers.concat({ name: "sum" }));
12
+ }
13
+ avg() {
14
+ return new NumberColumn(this._table, this._name, this._modifiers.concat({ name: "avg" }));
15
+ }
18
16
  }
19
- exports.default = NumberColumn;
20
- //# sourceMappingURL=number-column.js.map
17
+ export {
18
+ NumberColumn as default
19
+ };
@@ -1,26 +1,24 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const query_column_condition_1 = require("../condition/query-column-condition");
1
+ import QueryColumnCondition from "../condition/query-column-condition";
4
2
  class QueryColumn {
5
- _table;
6
- _name;
7
- _modifiers;
8
- _$type;
9
- _type;
10
- constructor(_table, _name, _modifiers = []) {
11
- this._table = _table;
12
- this._name = _name;
13
- this._modifiers = _modifiers;
14
- }
15
- as(alias) {
16
- return new this.constructor(this._table, this._name, this._modifiers.concat({ name: 'as', params: alias }));
17
- }
18
- isNull() {
19
- return new query_column_condition_1.default(this, 'is-null');
20
- }
21
- isNotNull() {
22
- return new query_column_condition_1.default(this, 'is-not-null');
23
- }
3
+ constructor(_table, _name, _modifiers = []) {
4
+ this._table = _table;
5
+ this._name = _name;
6
+ this._modifiers = _modifiers;
7
+ }
8
+ _$type;
9
+ _type;
10
+ // TODO I had to copy-paste the implementation to every child class to avoid a circular dependency
11
+ as(alias) {
12
+ return new this.constructor(this._table, this._name, this._modifiers.concat({ name: "as", params: alias }));
13
+ }
14
+ isNull() {
15
+ return new QueryColumnCondition(this, "is-null");
16
+ }
17
+ isNotNull() {
18
+ return new QueryColumnCondition(this, "is-not-null");
19
+ }
24
20
  }
25
- exports.default = QueryColumn;
26
- //# sourceMappingURL=query-column.js.map
21
+ var query_column_default = QueryColumn;
22
+ export {
23
+ query_column_default as default
24
+ };
@@ -1,37 +1,36 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const comparable_column_1 = require("./comparable-column");
4
- const number_column_1 = require("./number-column");
5
- const query_column_condition_1 = require("../condition/query-column-condition");
6
- class StringColumn extends comparable_column_1.default {
7
- _type = 'string';
8
- constructor(table, name, modifiers = []) {
9
- super(table, name, modifiers);
10
- }
11
- count() {
12
- return new number_column_1.default(this._table, this._name, this._modifiers.concat({ name: 'count' }));
13
- }
14
- lower() {
15
- return new this.constructor(this._table, this._name, this._modifiers.concat({ name: 'lower' }));
16
- }
17
- upper() {
18
- return new this.constructor(this._table, this._name, this._modifiers.concat({ name: 'upper' }));
19
- }
20
- contains(value) {
21
- return this.like('%' + value + '%');
22
- }
23
- startsWith(value) {
24
- return this.like(value + '%');
25
- }
26
- endsWith(value) {
27
- return this.like('%' + value);
28
- }
29
- like(value) {
30
- return new query_column_condition_1.default(this, 'like', value);
31
- }
32
- notLike(value) {
33
- return new query_column_condition_1.default(this, 'not-like', value);
34
- }
1
+ import ComparableColumn from "./comparable-column";
2
+ import NumberColumn from "./number-column";
3
+ import QueryColumnCondition from "../condition/query-column-condition";
4
+ class StringColumn extends ComparableColumn {
5
+ _type = "string";
6
+ constructor(table, name, modifiers = []) {
7
+ super(table, name, modifiers);
8
+ }
9
+ count() {
10
+ return new NumberColumn(this._table, this._name, this._modifiers.concat({ name: "count" }));
11
+ }
12
+ lower() {
13
+ return new this.constructor(this._table, this._name, this._modifiers.concat({ name: "lower" }));
14
+ }
15
+ upper() {
16
+ return new this.constructor(this._table, this._name, this._modifiers.concat({ name: "upper" }));
17
+ }
18
+ contains(value) {
19
+ return this.like("%" + value + "%");
20
+ }
21
+ startsWith(value) {
22
+ return this.like(value + "%");
23
+ }
24
+ endsWith(value) {
25
+ return this.like("%" + value);
26
+ }
27
+ like(value) {
28
+ return new QueryColumnCondition(this, "like", value);
29
+ }
30
+ notLike(value) {
31
+ return new QueryColumnCondition(this, "not-like", value);
32
+ }
35
33
  }
36
- exports.default = StringColumn;
37
- //# sourceMappingURL=string-column.js.map
34
+ export {
35
+ StringColumn as default
36
+ };
@@ -1,30 +1,29 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const query_column_condition_1 = require("../condition/query-column-condition");
4
- const query_ordering_1 = require("../other/query-ordering");
5
- const query_column_1 = require("./query-column");
6
- const query_join_condition_1 = require("../condition/query-join-condition");
7
- class ValueColumn extends query_column_1.default {
8
- constructor(table, name, modifiers = []) {
9
- super(table, name, modifiers);
10
- }
11
- asc() {
12
- return new query_ordering_1.default(this, 'ASC');
13
- }
14
- desc() {
15
- return new query_ordering_1.default(this, 'DESC');
16
- }
17
- eq(value) {
18
- if (value instanceof query_column_1.default) {
19
- return new query_join_condition_1.default(this, 'eq', value);
20
- }
21
- else {
22
- return new query_column_condition_1.default(this, 'eq', value);
23
- }
24
- }
25
- ne(value) {
26
- return new query_column_condition_1.default(this, 'ne', value);
1
+ import QueryColumnCondition from "../condition/query-column-condition";
2
+ import QueryOrdering from "../other/query-ordering";
3
+ import QueryColumn from "./query-column";
4
+ import QueryJoinCondition from "../condition/query-join-condition";
5
+ class ValueColumn extends QueryColumn {
6
+ constructor(table, name, modifiers = []) {
7
+ super(table, name, modifiers);
8
+ }
9
+ asc() {
10
+ return new QueryOrdering(this, "ASC");
11
+ }
12
+ desc() {
13
+ return new QueryOrdering(this, "DESC");
14
+ }
15
+ eq(value) {
16
+ if (value instanceof QueryColumn) {
17
+ return new QueryJoinCondition(this, "eq", value);
18
+ } else {
19
+ return new QueryColumnCondition(this, "eq", value);
27
20
  }
21
+ }
22
+ ne(value) {
23
+ return new QueryColumnCondition(this, "ne", value);
24
+ }
28
25
  }
29
- exports.default = ValueColumn;
30
- //# sourceMappingURL=value-column.js.map
26
+ var value_column_default = ValueColumn;
27
+ export {
28
+ value_column_default as default
29
+ };
@@ -1,23 +1,22 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const query_condition_1 = require("./query-condition");
4
- const query_condition_chain_1 = require("./query-condition-chain");
5
- class QueryColumnCondition extends query_condition_1.default {
6
- _column;
7
- _type;
8
- _values;
9
- constructor(column, type, ...values) {
10
- super();
11
- this._column = column;
12
- this._type = type;
13
- this._values = values;
14
- }
15
- and(condition) {
16
- return new query_condition_chain_1.default(this, condition, 'and');
17
- }
18
- or(condition) {
19
- return new query_condition_chain_1.default(this, condition, 'or');
20
- }
1
+ import QueryCondition from "./query-condition";
2
+ import QueryConditionChain from "./query-condition-chain";
3
+ class QueryColumnCondition extends QueryCondition {
4
+ _column;
5
+ _type;
6
+ _values;
7
+ constructor(column, type, ...values) {
8
+ super();
9
+ this._column = column;
10
+ this._type = type;
11
+ this._values = values;
12
+ }
13
+ and(condition) {
14
+ return new QueryConditionChain(this, condition, "and");
15
+ }
16
+ or(condition) {
17
+ return new QueryConditionChain(this, condition, "or");
18
+ }
21
19
  }
22
- exports.default = QueryColumnCondition;
23
- //# sourceMappingURL=query-column-condition.js.map
20
+ export {
21
+ QueryColumnCondition as default
22
+ };
@@ -1,34 +1,33 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const query_condition_1 = require("./query-condition");
4
- class QueryConditionChain extends query_condition_1.default {
5
- _$type;
6
- _sibling;
7
- _child;
8
- _chainType;
9
- _parenthesis = false;
10
- _negation = false;
11
- constructor(sibling, child, chainType) {
12
- super();
13
- this._sibling = sibling;
14
- this._child = child;
15
- this._chainType = chainType;
16
- }
17
- // TODO how to call this
18
- $() {
19
- this._parenthesis = true;
20
- return this;
21
- }
22
- not() {
23
- this._negation = true;
24
- return this;
25
- }
26
- and(condition) {
27
- return new QueryConditionChain(this, condition, 'and');
28
- }
29
- or(condition) {
30
- return new QueryConditionChain(this, condition, 'or');
31
- }
1
+ import QueryCondition from "./query-condition";
2
+ class QueryConditionChain extends QueryCondition {
3
+ _$type;
4
+ _sibling;
5
+ _child;
6
+ _chainType;
7
+ _parenthesis = false;
8
+ _negation = false;
9
+ constructor(sibling, child, chainType) {
10
+ super();
11
+ this._sibling = sibling;
12
+ this._child = child;
13
+ this._chainType = chainType;
14
+ }
15
+ // TODO how to call this
16
+ $() {
17
+ this._parenthesis = true;
18
+ return this;
19
+ }
20
+ not() {
21
+ this._negation = true;
22
+ return this;
23
+ }
24
+ and(condition) {
25
+ return new QueryConditionChain(this, condition, "and");
26
+ }
27
+ or(condition) {
28
+ return new QueryConditionChain(this, condition, "or");
29
+ }
32
30
  }
33
- exports.default = QueryConditionChain;
34
- //# sourceMappingURL=query-condition-chain.js.map
31
+ export {
32
+ QueryConditionChain as default
33
+ };
@@ -1,7 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- // TODO I had to copy-paste the method implementations to every child class to avoid circular dependencies
4
1
  class QueryCondition {
5
2
  }
6
- exports.default = QueryCondition;
7
- //# sourceMappingURL=query-condition.js.map
3
+ var query_condition_default = QueryCondition;
4
+ export {
5
+ query_condition_default as default
6
+ };